home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-09-28 | 190.0 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Sun Sep 27 20:35:12 1992, modified Sun Sep 27 20:35:12 1992, creator 'MPS ', type ASCII, 193872 bytes "Perl.man" , at 0x2f5d0 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 50 65 72 6c 2e 6d | 61 6e 00 00 00 00 00 00 |..Perl.m|an......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 02 f5 50 00 | 00 01 ac a6 ec 03 c0 a6 |......P.|........|
|00000060| ec 03 c0 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 76 af 00 00 |........|....v...|
|00000080| 2e 72 6e 20 27 27 20 7d | 60 0d 27 27 27 20 24 52 |.rn '' }|`.''' $R|
|00000090| 43 53 66 69 6c 65 3a 20 | 70 65 72 6c 2e 6d 61 6e |CSfile: |perl.man|
|000000a0| 2c 76 20 24 24 52 65 76 | 69 73 69 6f 6e 3a 20 34 |,v $$Rev|ision: 4|
|000000b0| 2e 30 2e 31 2e 36 20 24 | 24 44 61 74 65 3a 20 39 |.0.1.6 $|$Date: 9|
|000000c0| 32 2f 30 36 2f 30 38 20 | 31 35 3a 30 37 3a 32 39 |2/06/08 |15:07:29|
|000000d0| 20 24 0d 27 27 27 20 0d | 27 27 27 20 24 4c 6f 67 | $.''' .|''' $Log|
|000000e0| 3a 09 70 65 72 6c 2e 6d | 61 6e 2c 76 20 24 0d 27 |:.perl.m|an,v $.'|
|000000f0| 27 27 20 52 65 76 69 73 | 69 6f 6e 20 34 2e 30 2e |'' Revis|ion 4.0.|
|00000100| 31 2e 36 20 20 39 32 2f | 30 36 2f 30 38 20 20 31 |1.6 92/|06/08 1|
|00000110| 35 3a 30 37 3a 32 39 20 | 20 6c 77 61 6c 6c 0d 27 |5:07:29 | lwall.'|
|00000120| 27 27 20 70 61 74 63 68 | 32 30 3a 20 64 6f 63 75 |'' patch|20: docu|
|00000130| 6d 65 6e 74 65 64 20 74 | 68 61 74 20 6e 75 6d 62 |mented t|hat numb|
|00000140| 65 72 73 20 6d 61 79 20 | 63 6f 6e 74 61 69 6e 20 |ers may |contain |
|00000150| 75 6e 64 65 72 6c 69 6e | 65 0d 27 27 27 20 70 61 |underlin|e.''' pa|
|00000160| 74 63 68 32 30 3a 20 63 | 6c 61 72 69 66 69 65 64 |tch20: c|larified|
|00000170| 20 74 68 61 74 20 44 41 | 54 41 20 6d 61 79 20 6f | that DA|TA may o|
|00000180| 6e 6c 79 20 62 65 20 72 | 65 61 64 20 66 72 6f 6d |nly be r|ead from|
|00000190| 20 6d 61 69 6e 20 73 63 | 72 69 70 74 0d 27 27 27 | main sc|ript.'''|
|000001a0| 20 70 61 74 63 68 32 30 | 3a 20 72 65 6c 61 78 65 | patch20|: relaxe|
|000001b0| 64 20 72 65 71 75 69 72 | 65 6d 65 6e 74 20 66 6f |d requir|ement fo|
|000001c0| 72 20 73 65 6d 69 63 6f | 6c 6f 6e 20 61 74 20 74 |r semico|lon at t|
|000001d0| 68 65 20 65 6e 64 20 6f | 66 20 61 20 62 6c 6f 63 |he end o|f a bloc|
|000001e0| 6b 0d 27 27 27 20 70 61 | 74 63 68 32 30 3a 20 61 |k.''' pa|tch20: a|
|000001f0| 64 64 65 64 20 2e 2e 2e | 20 61 73 20 76 61 72 69 |dded ...| as vari|
|00000200| 61 6e 74 20 6f 6e 20 2e | 2e 0d 27 27 27 20 70 61 |ant on .|..''' pa|
|00000210| 74 63 68 32 30 3a 20 64 | 6f 63 75 6d 65 6e 74 65 |tch20: d|ocumente|
|00000220| 64 20 6e 65 65 64 20 66 | 6f 72 20 31 3b 20 61 74 |d need f|or 1; at|
|00000230| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 61 20 72 65 | the end| of a re|
|00000240| 71 75 69 72 65 64 20 66 | 69 6c 65 0d 27 27 27 20 |quired f|ile.''' |
|00000250| 70 61 74 63 68 32 30 3a | 20 65 78 74 65 6e 64 65 |patch20:| extende|
|00000260| 64 20 62 72 61 63 6b 65 | 74 2d 73 74 79 6c 65 20 |d bracke|t-style |
|00000270| 71 75 6f 74 65 73 20 74 | 6f 20 74 77 6f 2d 61 72 |quotes t|o two-ar|
|00000280| 67 20 6f 70 65 72 61 74 | 6f 72 73 3a 20 73 28 29 |g operat|ors: s()|
|00000290| 28 29 20 61 6e 64 20 74 | 72 28 29 28 29 0d 27 27 |() and t|r()().''|
|000002a0| 27 20 70 61 74 63 68 32 | 30 3a 20 70 61 72 61 67 |' patch2|0: parag|
|000002b0| 72 61 70 68 20 6d 6f 64 | 65 20 6e 6f 77 20 73 6b |raph mod|e now sk|
|000002c0| 69 70 73 20 65 78 74 72 | 61 20 6e 65 77 6c 69 6e |ips extr|a newlin|
|000002d0| 65 73 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |es autom|atically|
|000002e0| 0d 27 27 27 20 70 61 74 | 63 68 32 30 3a 20 64 6f |.''' pat|ch20: do|
|000002f0| 63 75 6d 65 6e 74 65 64 | 20 50 45 52 4c 4c 49 42 |cumented| PERLLIB|
|00000300| 20 61 6e 64 20 50 45 52 | 4c 44 42 0d 27 27 27 20 | and PER|LDB.''' |
|00000310| 70 61 74 63 68 32 30 3a | 20 64 6f 63 75 6d 65 6e |patch20:| documen|
|00000320| 74 65 64 20 6c 69 6d 69 | 74 20 6f 6e 20 73 69 7a |ted limi|t on siz|
|00000330| 65 20 6f 66 20 72 65 67 | 65 78 70 0d 27 27 27 20 |e of reg|exp.''' |
|00000340| 0d 27 27 27 20 52 65 76 | 69 73 69 6f 6e 20 34 2e |.''' Rev|ision 4.|
|00000350| 30 2e 31 2e 35 20 20 39 | 31 2f 31 31 2f 31 31 20 |0.1.5 9|1/11/11 |
|00000360| 20 31 36 3a 34 32 3a 30 | 30 20 20 6c 77 61 6c 6c | 16:42:0|0 lwall|
|00000370| 0d 27 27 27 20 70 61 74 | 63 68 31 39 3a 20 61 64 |.''' pat|ch19: ad|
|00000380| 64 65 64 20 6c 69 74 74 | 6c 65 2d 65 6e 64 69 61 |ded litt|le-endia|
|00000390| 6e 20 70 61 63 6b 2f 75 | 6e 70 61 63 6b 20 6f 70 |n pack/u|npack op|
|000003a0| 74 69 6f 6e 73 0d 27 27 | 27 20 0d 27 27 27 20 52 |tions.''|' .''' R|
|000003b0| 65 76 69 73 69 6f 6e 20 | 34 2e 30 2e 31 2e 34 20 |evision |4.0.1.4 |
|000003c0| 20 39 31 2f 31 31 2f 30 | 35 20 20 31 38 3a 31 31 | 91/11/0|5 18:11|
|000003d0| 3a 30 35 20 20 6c 77 61 | 6c 6c 0d 27 27 27 20 70 |:05 lwa|ll.''' p|
|000003e0| 61 74 63 68 31 31 3a 20 | 61 64 64 65 64 20 73 6f |atch11: |added so|
|000003f0| 72 74 20 7b 7d 20 4c 49 | 53 54 0d 27 27 27 20 70 |rt {} LI|ST.''' p|
|00000400| 61 74 63 68 31 31 3a 20 | 61 64 64 65 64 20 65 76 |atch11: |added ev|
|00000410| 61 6c 20 7b 7d 0d 27 27 | 27 20 70 61 74 63 68 31 |al {}.''|' patch1|
|00000420| 31 3a 20 64 6f 63 75 6d | 65 6e 74 65 64 20 6d 65 |1: docum|ented me|
|00000430| 61 6e 69 6e 67 20 6f 66 | 20 73 63 61 6c 61 72 28 |aning of| scalar(|
|00000440| 25 66 6f 6f 29 0d 27 27 | 27 20 70 61 74 63 68 31 |%foo).''|' patch1|
|00000450| 31 3a 20 73 70 72 69 6e | 74 66 28 29 20 6e 6f 77 |1: sprin|tf() now|
|00000460| 20 73 75 70 70 6f 72 74 | 73 20 61 6e 79 20 6c 65 | support|s any le|
|00000470| 6e 67 74 68 20 6f 66 20 | 73 20 66 69 65 6c 64 0d |ngth of |s field.|
|00000480| 27 27 27 20 0d 27 27 27 | 20 52 65 76 69 73 69 6f |''' .'''| Revisio|
|00000490| 6e 20 34 2e 30 2e 31 2e | 33 20 20 39 31 2f 30 36 |n 4.0.1.|3 91/06|
|000004a0| 2f 31 30 20 20 30 31 3a | 32 36 3a 30 32 20 20 6c |/10 01:|26:02 l|
|000004b0| 77 61 6c 6c 0d 27 27 27 | 20 70 61 74 63 68 31 30 |wall.'''| patch10|
|000004c0| 3a 20 64 6f 63 75 6d 65 | 6e 74 65 64 20 73 6f 6d |: docume|nted som|
|000004d0| 65 20 6e 65 77 65 72 20 | 66 65 61 74 75 72 65 73 |e newer |features|
|000004e0| 20 69 6e 20 61 64 64 65 | 6e 64 61 0d 27 27 27 20 | in adde|nda.''' |
|000004f0| 0d 27 27 27 20 52 65 76 | 69 73 69 6f 6e 20 34 2e |.''' Rev|ision 4.|
|00000500| 30 2e 31 2e 32 20 20 39 | 31 2f 30 36 2f 30 37 20 |0.1.2 9|1/06/07 |
|00000510| 20 31 31 3a 34 31 3a 32 | 33 20 20 6c 77 61 6c 6c | 11:41:2|3 lwall|
|00000520| 0d 27 27 27 20 70 61 74 | 63 68 34 3a 20 61 64 64 |.''' pat|ch4: add|
|00000530| 65 64 20 67 6c 6f 62 61 | 6c 20 6d 6f 64 69 66 69 |ed globa|l modifi|
|00000540| 65 72 20 66 6f 72 20 70 | 61 74 74 65 72 6e 20 6d |er for p|attern m|
|00000550| 61 74 63 68 65 73 0d 27 | 27 27 20 70 61 74 63 68 |atches.'|'' patch|
|00000560| 34 3a 20 64 65 66 61 75 | 6c 74 20 74 6f 70 2d 6f |4: defau|lt top-o|
|00000570| 66 2d 66 6f 72 6d 20 66 | 6f 72 6d 61 74 20 69 73 |f-form f|ormat is|
|00000580| 20 6e 6f 77 20 46 49 4c | 45 48 41 4e 44 4c 45 5f | now FIL|EHANDLE_|
|00000590| 54 4f 50 0d 27 27 27 20 | 70 61 74 63 68 34 3a 20 |TOP.''' |patch4: |
|000005a0| 61 64 64 65 64 20 24 5e | 50 20 76 61 72 69 61 62 |added $^|P variab|
|000005b0| 6c 65 20 74 6f 20 63 6f | 6e 74 72 6f 6c 20 63 61 |le to co|ntrol ca|
|000005c0| 6c 6c 69 6e 67 20 6f 66 | 20 70 65 72 6c 64 62 20 |lling of| perldb |
|000005d0| 72 6f 75 74 69 6e 65 73 | 0d 27 27 27 20 70 61 74 |routines|.''' pat|
|000005e0| 63 68 34 3a 20 61 64 64 | 65 64 20 24 5e 46 20 76 |ch4: add|ed $^F v|
|000005f0| 61 72 69 61 62 6c 65 20 | 74 6f 20 73 70 65 63 69 |ariable |to speci|
|00000600| 66 79 20 6d 61 78 69 6d | 75 6d 20 73 79 73 74 65 |fy maxim|um syste|
|00000610| 6d 20 66 64 2c 20 64 65 | 66 61 75 6c 74 20 32 0d |m fd, de|fault 2.|
|00000620| 27 27 27 20 70 61 74 63 | 68 34 3a 20 63 68 61 6e |''' patc|h4: chan|
|00000630| 67 65 64 20 6f 6c 64 20 | 24 5e 50 20 74 6f 20 24 |ged old |$^P to $|
|00000640| 5e 58 0d 27 27 27 20 0d | 27 27 27 20 52 65 76 69 |^X.''' .|''' Revi|
|00000650| 73 69 6f 6e 20 34 2e 30 | 2e 31 2e 31 20 20 39 31 |sion 4.0|.1.1 91|
|00000660| 2f 30 34 2f 31 31 20 20 | 31 37 3a 35 30 3a 34 34 |/04/11 |17:50:44|
|00000670| 20 20 6c 77 61 6c 6c 0d | 27 27 27 20 70 61 74 63 | lwall.|''' patc|
|00000680| 68 31 3a 20 66 69 78 65 | 64 20 73 6f 6d 65 20 74 |h1: fixe|d some t|
|00000690| 79 70 6f 73 0d 27 27 27 | 20 0d 27 27 27 20 52 65 |ypos.'''| .''' Re|
|000006a0| 76 69 73 69 6f 6e 20 34 | 2e 30 20 20 39 31 2f 30 |vision 4|.0 91/0|
|000006b0| 33 2f 32 30 20 20 30 31 | 3a 33 38 3a 30 38 20 20 |3/20 01|:38:08 |
|000006c0| 6c 77 61 6c 6c 0d 27 27 | 27 20 34 2e 30 20 62 61 |lwall.''|' 4.0 ba|
|000006d0| 73 65 6c 69 6e 65 2e 0d | 27 27 27 20 0d 27 27 27 |seline..|''' .'''|
|000006e0| 20 0d 2e 64 65 20 53 68 | 0d 2e 62 72 0d 2e 6e 65 | ..de Sh|..br..ne|
|000006f0| 20 35 0d 2e 50 50 0d 5c | 66 42 5c 5c 24 31 5c 66 | 5..PP.\|fB\\$1\f|
|00000700| 52 0d 2e 50 50 0d 2e 2e | 0d 2e 64 65 20 53 70 0d |R..PP...|..de Sp.|
|00000710| 2e 69 66 20 74 20 2e 73 | 70 20 2e 35 76 0d 2e 69 |.if t .s|p .5v..i|
|00000720| 66 20 6e 20 2e 73 70 0d | 2e 2e 0d 2e 64 65 20 49 |f n .sp.|....de I|
|00000730| 70 0d 2e 62 72 0d 2e 69 | 65 20 5c 5c 6e 28 2e 24 |p..br..i|e \\n(.$|
|00000740| 3e 3d 33 20 2e 6e 65 20 | 5c 5c 24 33 0d 2e 65 6c |>=3 .ne |\\$3..el|
|00000750| 20 2e 6e 65 20 33 0d 2e | 49 50 20 22 5c 5c 24 31 | .ne 3..|IP "\\$1|
|00000760| 22 20 5c 5c 24 32 0d 2e | 2e 0d 27 27 27 0d 27 27 |" \\$2..|..'''.''|
|00000770| 27 20 20 20 20 20 53 65 | 74 20 75 70 20 5c 2a 28 |' Se|t up \*(|
|00000780| 2d 2d 20 74 6f 20 67 69 | 76 65 20 61 6e 20 75 6e |-- to gi|ve an un|
|00000790| 62 72 65 61 6b 61 62 6c | 65 20 64 61 73 68 3b 0d |breakabl|e dash;.|
|000007a0| 27 27 27 20 20 20 20 20 | 73 74 72 69 6e 67 20 54 |''' |string T|
|000007b0| 72 20 68 6f 6c 64 73 20 | 75 73 65 72 20 64 65 66 |r holds |user def|
|000007c0| 69 6e 65 64 20 74 72 61 | 6e 73 6c 61 74 69 6f 6e |ined tra|nslation|
|000007d0| 20 73 74 72 69 6e 67 2e | 0d 27 27 27 20 20 20 20 | string.|.''' |
|000007e0| 20 42 65 6c 6c 20 53 79 | 73 74 65 6d 20 4c 6f 67 | Bell Sy|stem Log|
|000007f0| 6f 20 69 73 20 75 73 65 | 64 20 61 73 20 61 20 64 |o is use|d as a d|
|00000800| 75 6d 6d 79 20 63 68 61 | 72 61 63 74 65 72 2e 0d |ummy cha|racter..|
|00000810| 27 27 27 0d 2e 74 72 20 | 5c 28 2a 57 2d 7c 5c 28 |'''..tr |\(*W-|\(|
|00000820| 62 76 5c 2a 28 54 72 0d | 2e 69 65 20 6e 20 5c 7b |bv\*(Tr.|.ie n \{|
|00000830| 5c 0d 2e 64 73 20 2d 2d | 20 5c 28 2a 57 2d 0d 2e |\..ds --| \(*W-..|
|00000840| 69 66 20 28 5c 6e 28 2e | 48 3d 34 75 29 26 28 31 |if (\n(.|H=4u)&(1|
|00000850| 6d 3d 32 34 75 29 20 2e | 64 73 20 2d 2d 20 5c 28 |m=24u) .|ds -- \(|
|00000860| 2a 57 5c 68 27 2d 31 32 | 75 27 5c 28 2a 57 5c 68 |*W\h'-12|u'\(*W\h|
|00000870| 27 2d 31 32 75 27 2d 5c | 22 20 64 69 61 62 6c 6f |'-12u'-\|" diablo|
|00000880| 20 31 30 20 70 69 74 63 | 68 0d 2e 69 66 20 28 5c | 10 pitc|h..if (\|
|00000890| 6e 28 2e 48 3d 34 75 29 | 26 28 31 6d 3d 32 30 75 |n(.H=4u)|&(1m=20u|
|000008a0| 29 20 2e 64 73 20 2d 2d | 20 5c 28 2a 57 5c 68 27 |) .ds --| \(*W\h'|
|000008b0| 2d 31 32 75 27 5c 28 2a | 57 5c 68 27 2d 38 75 27 |-12u'\(*|W\h'-8u'|
|000008c0| 2d 5c 22 20 64 69 61 62 | 6c 6f 20 31 32 20 70 69 |-\" diab|lo 12 pi|
|000008d0| 74 63 68 0d 2e 64 73 20 | 4c 22 20 22 22 0d 2e 64 |tch..ds |L" ""..d|
|000008e0| 73 20 52 22 20 22 22 0d | 2e 64 73 20 4c 27 20 27 |s R" "".|.ds L' '|
|000008f0| 0d 2e 64 73 20 52 27 20 | 27 0d 27 62 72 5c 7d 0d |..ds R' |'.'br\}.|
|00000900| 2e 65 6c 5c 7b 5c 0d 2e | 64 73 20 2d 2d 20 5c 28 |.el\{\..|ds -- \(|
|00000910| 65 6d 5c 7c 0d 2e 74 72 | 20 5c 2a 28 54 72 0d 2e |em\|..tr| \*(Tr..|
|00000920| 64 73 20 4c 22 20 60 60 | 0d 2e 64 73 20 52 22 20 |ds L" ``|..ds R" |
|00000930| 27 27 0d 2e 64 73 20 4c | 27 20 60 0d 2e 64 73 20 |''..ds L|' `..ds |
|00000940| 52 27 20 27 0d 27 62 72 | 5c 7d 0d 2e 54 48 20 50 |R' '.'br|\}..TH P|
|00000950| 45 52 4c 20 31 20 22 5c | 2a 28 52 50 22 0d 2e 55 |ERL 1 "\|*(RP"..U|
|00000960| 43 0d 2e 53 48 20 4e 41 | 4d 45 0d 70 65 72 6c 20 |C..SH NA|ME.perl |
|00000970| 5c 2d 20 50 72 61 63 74 | 69 63 61 6c 20 45 78 74 |\- Pract|ical Ext|
|00000980| 72 61 63 74 69 6f 6e 20 | 61 6e 64 20 52 65 70 6f |raction |and Repo|
|00000990| 72 74 20 4c 61 6e 67 75 | 61 67 65 0d 2e 53 48 20 |rt Langu|age..SH |
|000009a0| 53 59 4e 4f 50 53 49 53 | 0d 2e 42 20 70 65 72 6c |SYNOPSIS|..B perl|
|000009b0| 0d 5b 6f 70 74 69 6f 6e | 73 5d 20 66 69 6c 65 6e |.[option|s] filen|
|000009c0| 61 6d 65 20 61 72 67 73 | 0d 2e 53 48 20 44 45 53 |ame args|..SH DES|
|000009d0| 43 52 49 50 54 49 4f 4e | 0d 2e 49 20 50 65 72 6c |CRIPTION|..I Perl|
|000009e0| 0d 69 73 20 61 6e 20 69 | 6e 74 65 72 70 72 65 74 |.is an i|nterpret|
|000009f0| 65 64 20 6c 61 6e 67 75 | 61 67 65 20 6f 70 74 69 |ed langu|age opti|
|00000a00| 6d 69 7a 65 64 20 66 6f | 72 20 73 63 61 6e 6e 69 |mized fo|r scanni|
|00000a10| 6e 67 20 61 72 62 69 74 | 72 61 72 79 20 74 65 78 |ng arbit|rary tex|
|00000a20| 74 20 66 69 6c 65 73 2c | 0d 65 78 74 72 61 63 74 |t files,|.extract|
|00000a30| 69 6e 67 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ing info|rmation |
|00000a40| 66 72 6f 6d 20 74 68 6f | 73 65 20 74 65 78 74 20 |from tho|se text |
|00000a50| 66 69 6c 65 73 2c 20 61 | 6e 64 20 70 72 69 6e 74 |files, a|nd print|
|00000a60| 69 6e 67 20 72 65 70 6f | 72 74 73 20 62 61 73 65 |ing repo|rts base|
|00000a70| 64 0d 6f 6e 20 74 68 61 | 74 20 69 6e 66 6f 72 6d |d.on tha|t inform|
|00000a80| 61 74 69 6f 6e 2e 0d 49 | 74 27 73 20 61 6c 73 6f |ation..I|t's also|
|00000a90| 20 61 20 67 6f 6f 64 20 | 6c 61 6e 67 75 61 67 65 | a good |language|
|00000aa0| 20 66 6f 72 20 6d 61 6e | 79 20 73 79 73 74 65 6d | for man|y system|
|00000ab0| 20 6d 61 6e 61 67 65 6d | 65 6e 74 20 74 61 73 6b | managem|ent task|
|00000ac0| 73 2e 0d 54 68 65 20 6c | 61 6e 67 75 61 67 65 20 |s..The l|anguage |
|00000ad0| 69 73 20 69 6e 74 65 6e | 64 65 64 20 74 6f 20 62 |is inten|ded to b|
|00000ae0| 65 20 70 72 61 63 74 69 | 63 61 6c 20 28 65 61 73 |e practi|cal (eas|
|00000af0| 79 20 74 6f 20 75 73 65 | 2c 20 65 66 66 69 63 69 |y to use|, effici|
|00000b00| 65 6e 74 2c 20 63 6f 6d | 70 6c 65 74 65 29 0d 72 |ent, com|plete).r|
|00000b10| 61 74 68 65 72 20 74 68 | 61 6e 20 62 65 61 75 74 |ather th|an beaut|
|00000b20| 69 66 75 6c 20 28 74 69 | 6e 79 2c 20 65 6c 65 67 |iful (ti|ny, eleg|
|00000b30| 61 6e 74 2c 20 6d 69 6e | 69 6d 61 6c 29 2e 0d 49 |ant, min|imal)..I|
|00000b40| 74 20 63 6f 6d 62 69 6e | 65 73 20 28 69 6e 20 74 |t combin|es (in t|
|00000b50| 68 65 20 61 75 74 68 6f | 72 27 73 20 6f 70 69 6e |he autho|r's opin|
|00000b60| 69 6f 6e 2c 20 61 6e 79 | 77 61 79 29 20 73 6f 6d |ion, any|way) som|
|00000b70| 65 20 6f 66 20 74 68 65 | 20 62 65 73 74 20 66 65 |e of the| best fe|
|00000b80| 61 74 75 72 65 73 20 6f | 66 20 43 2c 0d 5c 66 49 |atures o|f C,.\fI|
|00000b90| 73 65 64 5c 66 52 2c 20 | 5c 66 49 61 77 6b 5c 66 |sed\fR, |\fIawk\f|
|00000ba0| 52 2c 20 61 6e 64 20 5c | 66 49 73 68 5c 66 52 2c |R, and \|fIsh\fR,|
|00000bb0| 0d 73 6f 20 70 65 6f 70 | 6c 65 20 66 61 6d 69 6c |.so peop|le famil|
|00000bc0| 69 61 72 20 77 69 74 68 | 20 74 68 6f 73 65 20 6c |iar with| those l|
|00000bd0| 61 6e 67 75 61 67 65 73 | 20 73 68 6f 75 6c 64 20 |anguages| should |
|00000be0| 68 61 76 65 20 6c 69 74 | 74 6c 65 20 64 69 66 66 |have lit|tle diff|
|00000bf0| 69 63 75 6c 74 79 20 77 | 69 74 68 20 69 74 2e 0d |iculty w|ith it..|
|00000c00| 28 4c 61 6e 67 75 61 67 | 65 20 68 69 73 74 6f 72 |(Languag|e histor|
|00000c10| 69 61 6e 73 20 77 69 6c | 6c 20 61 6c 73 6f 20 6e |ians wil|l also n|
|00000c20| 6f 74 65 20 73 6f 6d 65 | 20 76 65 73 74 69 67 65 |ote some| vestige|
|00000c30| 73 20 6f 66 20 5c 66 49 | 63 73 68 5c 66 52 2c 20 |s of \fI|csh\fR, |
|00000c40| 50 61 73 63 61 6c 2c 20 | 61 6e 64 0d 65 76 65 6e |Pascal, |and.even|
|00000c50| 20 42 41 53 49 43 2d 50 | 4c 55 53 2e 29 0d 45 78 | BASIC-P|LUS.).Ex|
|00000c60| 70 72 65 73 73 69 6f 6e | 20 73 79 6e 74 61 78 20 |pression| syntax |
|00000c70| 63 6f 72 72 65 73 70 6f | 6e 64 73 20 71 75 69 74 |correspo|nds quit|
|00000c80| 65 20 63 6c 6f 73 65 6c | 79 20 74 6f 20 43 20 65 |e closel|y to C e|
|00000c90| 78 70 72 65 73 73 69 6f | 6e 20 73 79 6e 74 61 78 |xpressio|n syntax|
|00000ca0| 2e 0d 55 6e 6c 69 6b 65 | 20 6d 6f 73 74 20 55 6e |..Unlike| most Un|
|00000cb0| 69 78 20 75 74 69 6c 69 | 74 69 65 73 2c 0d 2e 49 |ix utili|ties,..I|
|00000cc0| 20 70 65 72 6c 0d 64 6f | 65 73 20 6e 6f 74 20 61 | perl.do|es not a|
|00000cd0| 72 62 69 74 72 61 72 69 | 6c 79 20 6c 69 6d 69 74 |rbitrari|ly limit|
|00000ce0| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 79 6f 75 | the siz|e of you|
|00000cf0| 72 20 64 61 74 61 5c 2a | 28 2d 2d 69 66 20 79 6f |r data\*|(--if yo|
|00000d00| 75 27 76 65 20 67 6f 74 | 0d 74 68 65 20 6d 65 6d |u've got|.the mem|
|00000d10| 6f 72 79 2c 0d 2e 49 20 | 70 65 72 6c 0d 63 61 6e |ory,..I |perl.can|
|00000d20| 20 73 6c 75 72 70 20 69 | 6e 20 79 6f 75 72 20 77 | slurp i|n your w|
|00000d30| 68 6f 6c 65 20 66 69 6c | 65 20 61 73 20 61 20 73 |hole fil|e as a s|
|00000d40| 69 6e 67 6c 65 20 73 74 | 72 69 6e 67 2e 0d 52 65 |ingle st|ring..Re|
|00000d50| 63 75 72 73 69 6f 6e 20 | 69 73 20 6f 66 20 75 6e |cursion |is of un|
|00000d60| 6c 69 6d 69 74 65 64 20 | 64 65 70 74 68 2e 0d 41 |limited |depth..A|
|00000d70| 6e 64 20 74 68 65 20 68 | 61 73 68 20 74 61 62 6c |nd the h|ash tabl|
|00000d80| 65 73 20 75 73 65 64 20 | 62 79 20 61 73 73 6f 63 |es used |by assoc|
|00000d90| 69 61 74 69 76 65 20 61 | 72 72 61 79 73 20 67 72 |iative a|rrays gr|
|00000da0| 6f 77 20 61 73 20 6e 65 | 63 65 73 73 61 72 79 20 |ow as ne|cessary |
|00000db0| 74 6f 20 70 72 65 76 65 | 6e 74 0d 64 65 67 72 61 |to preve|nt.degra|
|00000dc0| 64 65 64 20 70 65 72 66 | 6f 72 6d 61 6e 63 65 2e |ded perf|ormance.|
|00000dd0| 0d 2e 49 20 50 65 72 6c | 0d 75 73 65 73 20 73 6f |..I Perl|.uses so|
|00000de0| 70 68 69 73 74 69 63 61 | 74 65 64 20 70 61 74 74 |phistica|ted patt|
|00000df0| 65 72 6e 20 6d 61 74 63 | 68 69 6e 67 20 74 65 63 |ern matc|hing tec|
|00000e00| 68 6e 69 71 75 65 73 20 | 74 6f 20 73 63 61 6e 20 |hniques |to scan |
|00000e10| 6c 61 72 67 65 20 61 6d | 6f 75 6e 74 73 20 6f 66 |large am|ounts of|
|00000e20| 0d 64 61 74 61 20 76 65 | 72 79 20 71 75 69 63 6b |.data ve|ry quick|
|00000e30| 6c 79 2e 0d 41 6c 74 68 | 6f 75 67 68 20 6f 70 74 |ly..Alth|ough opt|
|00000e40| 69 6d 69 7a 65 64 20 66 | 6f 72 20 73 63 61 6e 6e |imized f|or scann|
|00000e50| 69 6e 67 20 74 65 78 74 | 2c 0d 2e 49 20 70 65 72 |ing text|,..I per|
|00000e60| 6c 0d 63 61 6e 20 61 6c | 73 6f 20 64 65 61 6c 20 |l.can al|so deal |
|00000e70| 77 69 74 68 20 62 69 6e | 61 72 79 20 64 61 74 61 |with bin|ary data|
|00000e80| 2c 20 61 6e 64 20 63 61 | 6e 20 6d 61 6b 65 20 64 |, and ca|n make d|
|00000e90| 62 6d 20 66 69 6c 65 73 | 20 6c 6f 6f 6b 20 6c 69 |bm files| look li|
|00000ea0| 6b 65 20 61 73 73 6f 63 | 69 61 74 69 76 65 0d 61 |ke assoc|iative.a|
|00000eb0| 72 72 61 79 73 20 28 77 | 68 65 72 65 20 64 62 6d |rrays (w|here dbm|
|00000ec0| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 29 2e 0d | is avai|lable)..|
|00000ed0| 53 65 74 75 69 64 0d 2e | 49 20 70 65 72 6c 0d 73 |Setuid..|I perl.s|
|00000ee0| 63 72 69 70 74 73 20 61 | 72 65 20 73 61 66 65 72 |cripts a|re safer|
|00000ef0| 20 74 68 61 6e 20 43 20 | 70 72 6f 67 72 61 6d 73 | than C |programs|
|00000f00| 0d 74 68 72 6f 75 67 68 | 20 61 20 64 61 74 61 66 |.through| a dataf|
|00000f10| 6c 6f 77 20 74 72 61 63 | 69 6e 67 20 6d 65 63 68 |low trac|ing mech|
|00000f20| 61 6e 69 73 6d 20 77 68 | 69 63 68 20 70 72 65 76 |anism wh|ich prev|
|00000f30| 65 6e 74 73 20 6d 61 6e | 79 20 73 74 75 70 69 64 |ents man|y stupid|
|00000f40| 20 73 65 63 75 72 69 74 | 79 20 68 6f 6c 65 73 2e | securit|y holes.|
|00000f50| 0d 49 66 20 79 6f 75 20 | 68 61 76 65 20 61 20 70 |.If you |have a p|
|00000f60| 72 6f 62 6c 65 6d 20 74 | 68 61 74 20 77 6f 75 6c |roblem t|hat woul|
|00000f70| 64 20 6f 72 64 69 6e 61 | 72 69 6c 79 20 75 73 65 |d ordina|rily use|
|00000f80| 20 5c 66 49 73 65 64 5c | 66 52 0d 6f 72 20 5c 66 | \fIsed\|fR.or \f|
|00000f90| 49 61 77 6b 5c 66 52 20 | 6f 72 20 5c 66 49 73 68 |Iawk\fR |or \fIsh|
|00000fa0| 5c 66 52 2c 20 62 75 74 | 20 69 74 0d 65 78 63 65 |\fR, but| it.exce|
|00000fb0| 65 64 73 20 74 68 65 69 | 72 20 63 61 70 61 62 69 |eds thei|r capabi|
|00000fc0| 6c 69 74 69 65 73 20 6f | 72 20 6d 75 73 74 20 72 |lities o|r must r|
|00000fd0| 75 6e 20 61 20 6c 69 74 | 74 6c 65 20 66 61 73 74 |un a lit|tle fast|
|00000fe0| 65 72 2c 0d 61 6e 64 20 | 79 6f 75 20 64 6f 6e 27 |er,.and |you don'|
|00000ff0| 74 20 77 61 6e 74 20 74 | 6f 20 77 72 69 74 65 20 |t want t|o write |
|00001000| 74 68 65 20 73 69 6c 6c | 79 20 74 68 69 6e 67 20 |the sill|y thing |
|00001010| 69 6e 20 43 2c 20 74 68 | 65 6e 0d 2e 49 20 70 65 |in C, th|en..I pe|
|00001020| 72 6c 0d 6d 61 79 20 62 | 65 20 66 6f 72 20 79 6f |rl.may b|e for yo|
|00001030| 75 2e 0d 54 68 65 72 65 | 20 61 72 65 20 61 6c 73 |u..There| are als|
|00001040| 6f 20 74 72 61 6e 73 6c | 61 74 6f 72 73 20 74 6f |o transl|ators to|
|00001050| 20 74 75 72 6e 20 79 6f | 75 72 0d 2e 49 20 73 65 | turn yo|ur..I se|
|00001060| 64 0d 61 6e 64 0d 2e 49 | 20 61 77 6b 0d 73 63 72 |d.and..I| awk.scr|
|00001070| 69 70 74 73 20 69 6e 74 | 6f 0d 2e 49 20 70 65 72 |ipts int|o..I per|
|00001080| 6c 0d 73 63 72 69 70 74 | 73 2e 0d 4f 4b 2c 20 65 |l.script|s..OK, e|
|00001090| 6e 6f 75 67 68 20 68 79 | 70 65 2e 0d 2e 50 50 0d |nough hy|pe...PP.|
|000010a0| 55 70 6f 6e 20 73 74 61 | 72 74 75 70 2c 0d 2e 49 |Upon sta|rtup,..I|
|000010b0| 20 70 65 72 6c 0d 6c 6f | 6f 6b 73 20 66 6f 72 20 | perl.lo|oks for |
|000010c0| 79 6f 75 72 20 73 63 72 | 69 70 74 20 69 6e 20 6f |your scr|ipt in o|
|000010d0| 6e 65 20 6f 66 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |ne of th|e follow|
|000010e0| 69 6e 67 20 70 6c 61 63 | 65 73 3a 0d 2e 49 70 20 |ing plac|es:..Ip |
|000010f0| 31 2e 20 34 20 32 0d 53 | 70 65 63 69 66 69 65 64 |1. 4 2.S|pecified|
|00001100| 20 6c 69 6e 65 20 62 79 | 20 6c 69 6e 65 20 76 69 | line by| line vi|
|00001110| 61 0d 2e 42 20 5c 2d 65 | 0d 73 77 69 74 63 68 65 |a..B \-e|.switche|
|00001120| 73 20 6f 6e 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |s on the| command|
|00001130| 20 6c 69 6e 65 2e 0d 2e | 49 70 20 32 2e 20 34 20 | line...|Ip 2. 4 |
|00001140| 32 0d 43 6f 6e 74 61 69 | 6e 65 64 20 69 6e 20 74 |2.Contai|ned in t|
|00001150| 68 65 20 66 69 6c 65 20 | 73 70 65 63 69 66 69 65 |he file |specifie|
|00001160| 64 20 62 79 20 74 68 65 | 20 66 69 72 73 74 20 66 |d by the| first f|
|00001170| 69 6c 65 6e 61 6d 65 20 | 6f 6e 20 74 68 65 20 63 |ilename |on the c|
|00001180| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 2e 0d 28 4e 6f |ommand l|ine..(No|
|00001190| 74 65 20 74 68 61 74 20 | 73 79 73 74 65 6d 73 20 |te that |systems |
|000011a0| 73 75 70 70 6f 72 74 69 | 6e 67 20 74 68 65 20 23 |supporti|ng the #|
|000011b0| 21 20 6e 6f 74 61 74 69 | 6f 6e 20 69 6e 76 6f 6b |! notati|on invok|
|000011c0| 65 20 69 6e 74 65 72 70 | 72 65 74 65 72 73 20 74 |e interp|reters t|
|000011d0| 68 69 73 20 77 61 79 2e | 29 0d 2e 49 70 20 33 2e |his way.|)..Ip 3.|
|000011e0| 20 34 20 32 0d 50 61 73 | 73 65 64 20 69 6e 20 69 | 4 2.Pas|sed in i|
|000011f0| 6d 70 6c 69 63 69 74 6c | 79 20 76 69 61 20 73 74 |mplicitl|y via st|
|00001200| 61 6e 64 61 72 64 20 69 | 6e 70 75 74 2e 0d 54 68 |andard i|nput..Th|
|00001210| 69 73 20 6f 6e 6c 79 20 | 77 6f 72 6b 73 20 69 66 |is only |works if|
|00001220| 20 74 68 65 72 65 20 61 | 72 65 20 6e 6f 20 66 69 | there a|re no fi|
|00001230| 6c 65 6e 61 6d 65 20 61 | 72 67 75 6d 65 6e 74 73 |lename a|rguments|
|00001240| 5c 2a 28 2d 2d 74 6f 20 | 70 61 73 73 0d 61 72 67 |\*(--to |pass.arg|
|00001250| 75 6d 65 6e 74 73 20 74 | 6f 20 61 0d 2e 49 20 73 |uments t|o a..I s|
|00001260| 74 64 69 6e 0d 73 63 72 | 69 70 74 20 79 6f 75 20 |tdin.scr|ipt you |
|00001270| 6d 75 73 74 20 65 78 70 | 6c 69 63 69 74 6c 79 20 |must exp|licitly |
|00001280| 73 70 65 63 69 66 79 20 | 61 20 5c 2d 20 66 6f 72 |specify |a \- for|
|00001290| 20 74 68 65 20 73 63 72 | 69 70 74 20 6e 61 6d 65 | the scr|ipt name|
|000012a0| 2e 0d 2e 50 50 0d 41 66 | 74 65 72 20 6c 6f 63 61 |...PP.Af|ter loca|
|000012b0| 74 69 6e 67 20 79 6f 75 | 72 20 73 63 72 69 70 74 |ting you|r script|
|000012c0| 2c 0d 2e 49 20 70 65 72 | 6c 0d 63 6f 6d 70 69 6c |,..I per|l.compil|
|000012d0| 65 73 20 69 74 20 74 6f | 20 61 6e 20 69 6e 74 65 |es it to| an inte|
|000012e0| 72 6e 61 6c 20 66 6f 72 | 6d 2e 0d 49 66 20 74 68 |rnal for|m..If th|
|000012f0| 65 20 73 63 72 69 70 74 | 20 69 73 20 73 79 6e 74 |e script| is synt|
|00001300| 61 63 74 69 63 61 6c 6c | 79 20 63 6f 72 72 65 63 |acticall|y correc|
|00001310| 74 2c 20 69 74 20 69 73 | 20 65 78 65 63 75 74 65 |t, it is| execute|
|00001320| 64 2e 0d 2e 53 68 20 22 | 4f 70 74 69 6f 6e 73 22 |d...Sh "|Options"|
|00001330| 0d 4e 6f 74 65 3a 20 6f | 6e 20 66 69 72 73 74 20 |.Note: o|n first |
|00001340| 72 65 61 64 69 6e 67 20 | 74 68 69 73 20 73 65 63 |reading |this sec|
|00001350| 74 69 6f 6e 20 6d 61 79 | 20 6e 6f 74 20 6d 61 6b |tion may| not mak|
|00001360| 65 20 6d 75 63 68 20 73 | 65 6e 73 65 20 74 6f 20 |e much s|ense to |
|00001370| 79 6f 75 2e 20 20 49 74 | 27 73 20 68 65 72 65 0d |you. It|'s here.|
|00001380| 61 74 20 74 68 65 20 66 | 72 6f 6e 74 20 66 6f 72 |at the f|ront for|
|00001390| 20 65 61 73 79 20 72 65 | 66 65 72 65 6e 63 65 2e | easy re|ference.|
|000013a0| 0d 2e 50 50 0d 41 20 73 | 69 6e 67 6c 65 2d 63 68 |..PP.A s|ingle-ch|
|000013b0| 61 72 61 63 74 65 72 20 | 6f 70 74 69 6f 6e 20 6d |aracter |option m|
|000013c0| 61 79 20 62 65 20 63 6f | 6d 62 69 6e 65 64 20 77 |ay be co|mbined w|
|000013d0| 69 74 68 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ith the |followin|
|000013e0| 67 20 6f 70 74 69 6f 6e | 2c 20 69 66 20 61 6e 79 |g option|, if any|
|000013f0| 2e 0d 54 68 69 73 20 69 | 73 20 70 61 72 74 69 63 |..This i|s partic|
|00001400| 75 6c 61 72 6c 79 20 75 | 73 65 66 75 6c 20 77 68 |ularly u|seful wh|
|00001410| 65 6e 20 69 6e 76 6f 6b | 69 6e 67 20 61 20 73 63 |en invok|ing a sc|
|00001420| 72 69 70 74 20 75 73 69 | 6e 67 20 74 68 65 20 23 |ript usi|ng the #|
|00001430| 21 20 63 6f 6e 73 74 72 | 75 63 74 20 77 68 69 63 |! constr|uct whic|
|00001440| 68 0d 6f 6e 6c 79 20 61 | 6c 6c 6f 77 73 20 6f 6e |h.only a|llows on|
|00001450| 65 20 61 72 67 75 6d 65 | 6e 74 2e 20 20 45 78 61 |e argume|nt. Exa|
|00001460| 6d 70 6c 65 3a 0d 2e 6e | 66 0d 0d 2e 6e 65 20 32 |mple:..n|f...ne 2|
|00001470| 0d 09 23 21 2f 75 73 72 | 2f 62 69 6e 2f 70 65 72 |..#!/usr|/bin/per|
|00001480| 6c 20 5c 2d 73 70 69 2e | 62 61 6b 09 23 20 73 61 |l \-spi.|bak.# sa|
|00001490| 6d 65 20 61 73 20 5c 2d | 73 20 5c 2d 70 20 5c 2d |me as \-|s \-p \-|
|000014a0| 69 2e 62 61 6b 0d 09 2e | 5c 7c 2e 5c 7c 2e 0d 0d |i.bak...|\|.\|...|
|000014b0| 2e 66 69 0d 4f 70 74 69 | 6f 6e 73 20 69 6e 63 6c |.fi.Opti|ons incl|
|000014c0| 75 64 65 3a 0d 2e 54 50 | 20 35 0d 2e 42 49 20 5c |ude:..TP| 5..BI \|
|000014d0| 2d 30 20 64 69 67 69 74 | 73 0d 73 70 65 63 69 66 |-0 digit|s.specif|
|000014e0| 69 65 73 20 74 68 65 20 | 72 65 63 6f 72 64 20 73 |ies the |record s|
|000014f0| 65 70 61 72 61 74 6f 72 | 20 28 24 2f 29 20 61 73 |eparator| ($/) as|
|00001500| 20 61 6e 20 6f 63 74 61 | 6c 20 6e 75 6d 62 65 72 | an octa|l number|
|00001510| 2e 0d 49 66 20 74 68 65 | 72 65 20 61 72 65 20 6e |..If the|re are n|
|00001520| 6f 20 64 69 67 69 74 73 | 2c 20 74 68 65 20 6e 75 |o digits|, the nu|
|00001530| 6c 6c 20 63 68 61 72 61 | 63 74 65 72 20 69 73 20 |ll chara|cter is |
|00001540| 74 68 65 20 73 65 70 61 | 72 61 74 6f 72 2e 0d 4f |the sepa|rator..O|
|00001550| 74 68 65 72 20 73 77 69 | 74 63 68 65 73 20 6d 61 |ther swi|tches ma|
|00001560| 79 20 70 72 65 63 65 64 | 65 20 6f 72 20 66 6f 6c |y preced|e or fol|
|00001570| 6c 6f 77 20 74 68 65 20 | 64 69 67 69 74 73 2e 0d |low the |digits..|
|00001580| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 69 66 20 |For exam|ple, if |
|00001590| 79 6f 75 20 68 61 76 65 | 20 61 20 76 65 72 73 69 |you have| a versi|
|000015a0| 6f 6e 20 6f 66 0d 2e 49 | 20 66 69 6e 64 0d 77 68 |on of..I| find.wh|
|000015b0| 69 63 68 20 63 61 6e 20 | 70 72 69 6e 74 20 66 69 |ich can |print fi|
|000015c0| 6c 65 6e 61 6d 65 73 20 | 74 65 72 6d 69 6e 61 74 |lenames |terminat|
|000015d0| 65 64 20 62 79 20 74 68 | 65 20 6e 75 6c 6c 20 63 |ed by th|e null c|
|000015e0| 68 61 72 61 63 74 65 72 | 2c 20 79 6f 75 20 63 61 |haracter|, you ca|
|000015f0| 6e 20 73 61 79 20 74 68 | 69 73 3a 0d 2e 6e 66 0d |n say th|is:..nf.|
|00001600| 0d 20 20 20 20 66 69 6e | 64 20 2e 20 5c 2d 6e 61 |. fin|d . \-na|
|00001610| 6d 65 20 27 2a 2e 62 61 | 6b 27 20 5c 2d 70 72 69 |me '*.ba|k' \-pri|
|00001620| 6e 74 30 20 7c 20 70 65 | 72 6c 20 5c 2d 6e 30 65 |nt0 | pe|rl \-n0e|
|00001630| 20 75 6e 6c 69 6e 6b 0d | 0d 2e 66 69 0d 54 68 65 | unlink.|..fi.The|
|00001640| 20 73 70 65 63 69 61 6c | 20 76 61 6c 75 65 20 30 | special| value 0|
|00001650| 30 20 77 69 6c 6c 20 63 | 61 75 73 65 20 50 65 72 |0 will c|ause Per|
|00001660| 6c 20 74 6f 20 73 6c 75 | 72 70 20 66 69 6c 65 73 |l to slu|rp files|
|00001670| 20 69 6e 20 70 61 72 61 | 67 72 61 70 68 20 6d 6f | in para|graph mo|
|00001680| 64 65 2e 0d 54 68 65 20 | 76 61 6c 75 65 20 30 37 |de..The |value 07|
|00001690| 37 37 20 77 69 6c 6c 20 | 63 61 75 73 65 20 50 65 |77 will |cause Pe|
|000016a0| 72 6c 20 74 6f 20 73 6c | 75 72 70 20 66 69 6c 65 |rl to sl|urp file|
|000016b0| 73 20 77 68 6f 6c 65 20 | 73 69 6e 63 65 20 74 68 |s whole |since th|
|000016c0| 65 72 65 20 69 73 20 6e | 6f 0d 6c 65 67 61 6c 20 |ere is n|o.legal |
|000016d0| 63 68 61 72 61 63 74 65 | 72 20 77 69 74 68 20 74 |characte|r with t|
|000016e0| 68 61 74 20 76 61 6c 75 | 65 2e 0d 2e 54 50 20 35 |hat valu|e...TP 5|
|000016f0| 0d 2e 42 20 5c 2d 61 0d | 74 75 72 6e 73 20 6f 6e |..B \-a.|turns on|
|00001700| 20 61 75 74 6f 73 70 6c | 69 74 20 6d 6f 64 65 20 | autospl|it mode |
|00001710| 77 68 65 6e 20 75 73 65 | 64 20 77 69 74 68 20 61 |when use|d with a|
|00001720| 0d 2e 42 20 5c 2d 6e 0d | 6f 72 0d 2e 42 52 20 5c |..B \-n.|or..BR \|
|00001730| 2d 70 20 2e 0d 41 6e 20 | 69 6d 70 6c 69 63 69 74 |-p ..An |implicit|
|00001740| 20 73 70 6c 69 74 20 63 | 6f 6d 6d 61 6e 64 20 74 | split c|ommand t|
|00001750| 6f 20 74 68 65 20 40 46 | 20 61 72 72 61 79 0d 69 |o the @F| array.i|
|00001760| 73 20 64 6f 6e 65 20 61 | 73 20 74 68 65 20 66 69 |s done a|s the fi|
|00001770| 72 73 74 20 74 68 69 6e | 67 20 69 6e 73 69 64 65 |rst thin|g inside|
|00001780| 20 74 68 65 20 69 6d 70 | 6c 69 63 69 74 20 77 68 | the imp|licit wh|
|00001790| 69 6c 65 20 6c 6f 6f 70 | 20 70 72 6f 64 75 63 65 |ile loop| produce|
|000017a0| 64 20 62 79 0d 74 68 65 | 0d 2e 42 20 5c 2d 6e 0d |d by.the|..B \-n.|
|000017b0| 6f 72 0d 2e 42 52 20 5c | 2d 70 20 2e 0d 2e 6e 66 |or..BR \|-p ...nf|
|000017c0| 0d 0d 09 70 65 72 6c 20 | 5c 2d 61 6e 65 20 5c 27 |...perl |\-ane \'|
|000017d0| 70 72 69 6e 74 20 70 6f | 70 28 40 46 29 2c 20 22 |print po|p(@F), "|
|000017e0| 5c 65 6e 22 3b 5c 27 0d | 0d 69 73 20 65 71 75 69 |\en";\'.|.is equi|
|000017f0| 76 61 6c 65 6e 74 20 74 | 6f 0d 0d 09 77 68 69 6c |valent t|o...whil|
|00001800| 65 20 28 3c 3e 29 20 7b | 0d 09 09 40 46 20 3d 20 |e (<>) {|...@F = |
|00001810| 73 70 6c 69 74 28 5c 27 | 20 5c 27 29 3b 0d 09 09 |split(\'| \');...|
|00001820| 70 72 69 6e 74 20 70 6f | 70 28 40 46 29 2c 20 22 |print po|p(@F), "|
|00001830| 5c 65 6e 22 3b 0d 09 7d | 0d 0d 2e 66 69 0d 2e 54 |\en";..}|...fi..T|
|00001840| 50 20 35 0d 2e 42 20 5c | 2d 63 0d 63 61 75 73 65 |P 5..B \|-c.cause|
|00001850| 73 0d 2e 49 20 70 65 72 | 6c 0d 74 6f 20 63 68 65 |s..I per|l.to che|
|00001860| 63 6b 20 74 68 65 20 73 | 79 6e 74 61 78 20 6f 66 |ck the s|yntax of|
|00001870| 20 74 68 65 20 73 63 72 | 69 70 74 20 61 6e 64 20 | the scr|ipt and |
|00001880| 74 68 65 6e 20 65 78 69 | 74 20 77 69 74 68 6f 75 |then exi|t withou|
|00001890| 74 20 65 78 65 63 75 74 | 69 6e 67 20 69 74 2e 0d |t execut|ing it..|
|000018a0| 2e 54 50 20 35 0d 2e 42 | 49 20 5c 2d 64 0d 72 75 |.TP 5..B|I \-d.ru|
|000018b0| 6e 73 20 74 68 65 20 73 | 63 72 69 70 74 20 75 6e |ns the s|cript un|
|000018c0| 64 65 72 20 74 68 65 20 | 70 65 72 6c 20 64 65 62 |der the |perl deb|
|000018d0| 75 67 67 65 72 2e 0d 53 | 65 65 20 74 68 65 20 73 |ugger..S|ee the s|
|000018e0| 65 63 74 69 6f 6e 20 6f | 6e 20 44 65 62 75 67 67 |ection o|n Debugg|
|000018f0| 69 6e 67 2e 0d 2e 54 50 | 20 35 0d 2e 42 49 20 5c |ing...TP| 5..BI \|
|00001900| 2d 44 20 6e 75 6d 62 65 | 72 0d 73 65 74 73 20 64 |-D numbe|r.sets d|
|00001910| 65 62 75 67 67 69 6e 67 | 20 66 6c 61 67 73 2e 0d |ebugging| flags..|
|00001920| 54 6f 20 77 61 74 63 68 | 20 68 6f 77 20 69 74 20 |To watch| how it |
|00001930| 65 78 65 63 75 74 65 73 | 20 79 6f 75 72 20 73 63 |executes| your sc|
|00001940| 72 69 70 74 2c 20 75 73 | 65 0d 2e 42 52 20 5c 2d |ript, us|e..BR \-|
|00001950| 44 31 34 20 2e 0d 28 54 | 68 69 73 20 6f 6e 6c 79 |D14 ..(T|his only|
|00001960| 20 77 6f 72 6b 73 20 69 | 66 20 64 65 62 75 67 67 | works i|f debugg|
|00001970| 69 6e 67 20 69 73 20 63 | 6f 6d 70 69 6c 65 64 20 |ing is c|ompiled |
|00001980| 69 6e 74 6f 20 79 6f 75 | 72 0d 2e 49 52 20 70 65 |into you|r..IR pe|
|00001990| 72 6c 20 2e 29 0d 41 6e | 6f 74 68 65 72 20 6e 69 |rl .).An|other ni|
|000019a0| 63 65 20 76 61 6c 75 65 | 20 69 73 20 5c 2d 44 31 |ce value| is \-D1|
|000019b0| 30 32 34 2c 20 77 68 69 | 63 68 20 6c 69 73 74 73 |024, whi|ch lists|
|000019c0| 20 79 6f 75 72 20 63 6f | 6d 70 69 6c 65 64 20 73 | your co|mpiled s|
|000019d0| 79 6e 74 61 78 20 74 72 | 65 65 2e 0d 41 6e 64 20 |yntax tr|ee..And |
|000019e0| 5c 2d 44 35 31 32 20 64 | 69 73 70 6c 61 79 73 20 |\-D512 d|isplays |
|000019f0| 63 6f 6d 70 69 6c 65 64 | 20 72 65 67 75 6c 61 72 |compiled| regular|
|00001a00| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2e 0d 2e 54 | express|ions...T|
|00001a10| 50 20 35 0d 2e 42 49 20 | 5c 2d 65 20 22 20 63 6f |P 5..BI |\-e " co|
|00001a20| 6d 6d 61 6e 64 6c 69 6e | 65 22 0d 6d 61 79 20 62 |mmandlin|e".may b|
|00001a30| 65 20 75 73 65 64 20 74 | 6f 20 65 6e 74 65 72 20 |e used t|o enter |
|00001a40| 6f 6e 65 20 6c 69 6e 65 | 20 6f 66 20 73 63 72 69 |one line| of scri|
|00001a50| 70 74 2e 0d 4d 75 6c 74 | 69 70 6c 65 0d 2e 42 20 |pt..Mult|iple..B |
|00001a60| 5c 2d 65 0d 63 6f 6d 6d | 61 6e 64 73 20 6d 61 79 |\-e.comm|ands may|
|00001a70| 20 62 65 20 67 69 76 65 | 6e 20 74 6f 20 62 75 69 | be give|n to bui|
|00001a80| 6c 64 20 75 70 20 61 20 | 6d 75 6c 74 69 2d 6c 69 |ld up a |multi-li|
|00001a90| 6e 65 20 73 63 72 69 70 | 74 2e 0d 49 66 0d 2e 42 |ne scrip|t..If..B|
|00001aa0| 20 5c 2d 65 0d 69 73 20 | 67 69 76 65 6e 2c 0d 2e | \-e.is |given,..|
|00001ab0| 49 20 70 65 72 6c 0d 77 | 69 6c 6c 20 6e 6f 74 20 |I perl.w|ill not |
|00001ac0| 6c 6f 6f 6b 20 66 6f 72 | 20 61 20 73 63 72 69 70 |look for| a scrip|
|00001ad0| 74 20 66 69 6c 65 6e 61 | 6d 65 20 69 6e 20 74 68 |t filena|me in th|
|00001ae0| 65 20 61 72 67 75 6d 65 | 6e 74 20 6c 69 73 74 2e |e argume|nt list.|
|00001af0| 0d 2e 54 50 20 35 0d 2e | 42 49 20 5c 2d 69 20 65 |..TP 5..|BI \-i e|
|00001b00| 78 74 65 6e 73 69 6f 6e | 0d 73 70 65 63 69 66 69 |xtension|.specifi|
|00001b10| 65 73 20 74 68 61 74 20 | 66 69 6c 65 73 20 70 72 |es that |files pr|
|00001b20| 6f 63 65 73 73 65 64 20 | 62 79 20 74 68 65 20 3c |ocessed |by the <|
|00001b30| 3e 20 63 6f 6e 73 74 72 | 75 63 74 20 61 72 65 20 |> constr|uct are |
|00001b40| 74 6f 20 62 65 20 65 64 | 69 74 65 64 0d 69 6e 2d |to be ed|ited.in-|
|00001b50| 70 6c 61 63 65 2e 0d 49 | 74 20 64 6f 65 73 20 74 |place..I|t does t|
|00001b60| 68 69 73 20 62 79 20 72 | 65 6e 61 6d 69 6e 67 20 |his by r|enaming |
|00001b70| 74 68 65 20 69 6e 70 75 | 74 20 66 69 6c 65 2c 20 |the inpu|t file, |
|00001b80| 6f 70 65 6e 69 6e 67 20 | 74 68 65 20 6f 75 74 70 |opening |the outp|
|00001b90| 75 74 20 66 69 6c 65 20 | 62 79 20 74 68 65 0d 73 |ut file |by the.s|
|00001ba0| 61 6d 65 20 6e 61 6d 65 | 2c 20 61 6e 64 20 73 65 |ame name|, and se|
|00001bb0| 6c 65 63 74 69 6e 67 20 | 74 68 61 74 20 6f 75 74 |lecting |that out|
|00001bc0| 70 75 74 20 66 69 6c 65 | 20 61 73 20 74 68 65 20 |put file| as the |
|00001bd0| 64 65 66 61 75 6c 74 20 | 66 6f 72 20 70 72 69 6e |default |for prin|
|00001be0| 74 20 73 74 61 74 65 6d | 65 6e 74 73 2e 0d 54 68 |t statem|ents..Th|
|00001bf0| 65 20 65 78 74 65 6e 73 | 69 6f 6e 2c 20 69 66 20 |e extens|ion, if |
|00001c00| 73 75 70 70 6c 69 65 64 | 2c 20 69 73 20 61 64 64 |supplied|, is add|
|00001c10| 65 64 20 74 6f 20 74 68 | 65 20 6e 61 6d 65 20 6f |ed to th|e name o|
|00001c20| 66 20 74 68 65 0d 6f 6c | 64 20 66 69 6c 65 20 74 |f the.ol|d file t|
|00001c30| 6f 20 6d 61 6b 65 20 61 | 20 62 61 63 6b 75 70 20 |o make a| backup |
|00001c40| 63 6f 70 79 2e 0d 49 66 | 20 6e 6f 20 65 78 74 65 |copy..If| no exte|
|00001c50| 6e 73 69 6f 6e 20 69 73 | 20 73 75 70 70 6c 69 65 |nsion is| supplie|
|00001c60| 64 2c 20 6e 6f 20 62 61 | 63 6b 75 70 20 69 73 20 |d, no ba|ckup is |
|00001c70| 6d 61 64 65 2e 0d 53 61 | 79 69 6e 67 20 5c 2a 28 |made..Sa|ying \*(|
|00001c80| 4c 22 70 65 72 6c 20 5c | 2d 70 20 5c 2d 69 2e 62 |L"perl \|-p \-i.b|
|00001c90| 61 6b 20 5c 2d 65 20 22 | 73 2f 66 6f 6f 2f 62 61 |ak \-e "|s/foo/ba|
|00001ca0| 72 2f 3b 22 20 2e 5c 7c | 2e 5c 7c 2e 20 5c 2a 28 |r/;" .\||.\|. \*(|
|00001cb0| 52 22 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |R" is th|e same a|
|00001cc0| 73 20 75 73 69 6e 67 0d | 74 68 65 20 73 63 72 69 |s using.|the scri|
|00001cd0| 70 74 3a 0d 2e 6e 66 0d | 0d 2e 6e 65 20 32 0d 09 |pt:..nf.|..ne 2..|
|00001ce0| 23 21 2f 75 73 72 2f 62 | 69 6e 2f 70 65 72 6c 20 |#!/usr/b|in/perl |
|00001cf0| 5c 2d 70 69 2e 62 61 6b | 0d 09 73 2f 66 6f 6f 2f |\-pi.bak|..s/foo/|
|00001d00| 62 61 72 2f 3b 0d 0d 77 | 68 69 63 68 20 69 73 20 |bar/;..w|hich is |
|00001d10| 65 71 75 69 76 61 6c 65 | 6e 74 20 74 6f 0d 0d 2e |equivale|nt to...|
|00001d20| 6e 65 20 31 34 0d 09 23 | 21 2f 75 73 72 2f 62 69 |ne 14..#|!/usr/bi|
|00001d30| 6e 2f 70 65 72 6c 0d 09 | 77 68 69 6c 65 20 28 3c |n/perl..|while (<|
|00001d40| 3e 29 20 7b 0d 09 09 69 | 66 20 28 24 41 52 47 56 |>) {...i|f ($ARGV|
|00001d50| 20 6e 65 20 24 6f 6c 64 | 61 72 67 76 29 20 7b 0d | ne $old|argv) {.|
|00001d60| 09 09 09 72 65 6e 61 6d | 65 28 24 41 52 47 56 2c |...renam|e($ARGV,|
|00001d70| 20 24 41 52 47 56 20 2e | 20 5c 27 2e 62 61 6b 5c | $ARGV .| \'.bak\|
|00001d80| 27 29 3b 0d 09 09 09 6f | 70 65 6e 28 41 52 47 56 |');....o|pen(ARGV|
|00001d90| 4f 55 54 2c 20 22 3e 24 | 41 52 47 56 22 29 3b 0d |OUT, ">$|ARGV");.|
|00001da0| 09 09 09 73 65 6c 65 63 | 74 28 41 52 47 56 4f 55 |...selec|t(ARGVOU|
|00001db0| 54 29 3b 0d 09 09 09 24 | 6f 6c 64 61 72 67 76 20 |T);....$|oldargv |
|00001dc0| 3d 20 24 41 52 47 56 3b | 0d 09 09 7d 0d 09 09 73 |= $ARGV;|...}...s|
|00001dd0| 2f 66 6f 6f 2f 62 61 72 | 2f 3b 0d 09 7d 0d 09 63 |/foo/bar|/;..}..c|
|00001de0| 6f 6e 74 69 6e 75 65 20 | 7b 0d 09 20 20 20 20 70 |ontinue |{.. p|
|00001df0| 72 69 6e 74 3b 09 23 20 | 74 68 69 73 20 70 72 69 |rint;.# |this pri|
|00001e00| 6e 74 73 20 74 6f 20 6f | 72 69 67 69 6e 61 6c 20 |nts to o|riginal |
|00001e10| 66 69 6c 65 6e 61 6d 65 | 0d 09 7d 0d 09 73 65 6c |filename|..}..sel|
|00001e20| 65 63 74 28 53 54 44 4f | 55 54 29 3b 0d 0d 2e 66 |ect(STDO|UT);...f|
|00001e30| 69 0d 65 78 63 65 70 74 | 20 74 68 61 74 20 74 68 |i.except| that th|
|00001e40| 65 0d 2e 42 20 5c 2d 69 | 0d 66 6f 72 6d 20 64 6f |e..B \-i|.form do|
|00001e50| 65 73 6e 27 74 20 6e 65 | 65 64 20 74 6f 20 63 6f |esn't ne|ed to co|
|00001e60| 6d 70 61 72 65 20 24 41 | 52 47 56 20 74 6f 20 24 |mpare $A|RGV to $|
|00001e70| 6f 6c 64 61 72 67 76 20 | 74 6f 20 6b 6e 6f 77 20 |oldargv |to know |
|00001e80| 77 68 65 6e 0d 74 68 65 | 20 66 69 6c 65 6e 61 6d |when.the| filenam|
|00001e90| 65 20 68 61 73 20 63 68 | 61 6e 67 65 64 2e 0d 49 |e has ch|anged..I|
|00001ea0| 74 20 64 6f 65 73 2c 20 | 68 6f 77 65 76 65 72 2c |t does, |however,|
|00001eb0| 20 75 73 65 20 41 52 47 | 56 4f 55 54 20 66 6f 72 | use ARG|VOUT for|
|00001ec0| 20 74 68 65 20 73 65 6c | 65 63 74 65 64 20 66 69 | the sel|ected fi|
|00001ed0| 6c 65 68 61 6e 64 6c 65 | 2e 0d 4e 6f 74 65 20 74 |lehandle|..Note t|
|00001ee0| 68 61 74 0d 2e 49 20 53 | 54 44 4f 55 54 0d 69 73 |hat..I S|TDOUT.is|
|00001ef0| 20 72 65 73 74 6f 72 65 | 64 20 61 73 20 74 68 65 | restore|d as the|
|00001f00| 20 64 65 66 61 75 6c 74 | 20 6f 75 74 70 75 74 20 | default| output |
|00001f10| 66 69 6c 65 68 61 6e 64 | 6c 65 20 61 66 74 65 72 |filehand|le after|
|00001f20| 20 74 68 65 20 6c 6f 6f | 70 2e 0d 2e 53 70 0d 59 | the loo|p...Sp.Y|
|00001f30| 6f 75 20 63 61 6e 20 75 | 73 65 20 65 6f 66 20 74 |ou can u|se eof t|
|00001f40| 6f 20 6c 6f 63 61 74 65 | 20 74 68 65 20 65 6e 64 |o locate| the end|
|00001f50| 20 6f 66 20 65 61 63 68 | 20 69 6e 70 75 74 20 66 | of each| input f|
|00001f60| 69 6c 65 2c 20 69 6e 20 | 63 61 73 65 20 79 6f 75 |ile, in |case you|
|00001f70| 20 77 61 6e 74 0d 74 6f | 20 61 70 70 65 6e 64 20 | want.to| append |
|00001f80| 74 6f 20 65 61 63 68 20 | 66 69 6c 65 2c 20 6f 72 |to each |file, or|
|00001f90| 20 72 65 73 65 74 20 6c | 69 6e 65 20 6e 75 6d 62 | reset l|ine numb|
|00001fa0| 65 72 69 6e 67 20 28 73 | 65 65 20 65 78 61 6d 70 |ering (s|ee examp|
|00001fb0| 6c 65 20 75 6e 64 65 72 | 20 65 6f 66 29 2e 0d 2e |le under| eof)...|
|00001fc0| 54 50 20 35 0d 2e 42 49 | 20 5c 2d 49 20 64 69 72 |TP 5..BI| \-I dir|
|00001fd0| 65 63 74 6f 72 79 0d 6d | 61 79 20 62 65 20 75 73 |ectory.m|ay be us|
|00001fe0| 65 64 20 69 6e 20 63 6f | 6e 6a 75 6e 63 74 69 6f |ed in co|njunctio|
|00001ff0| 6e 20 77 69 74 68 0d 2e | 42 20 5c 2d 50 0d 74 6f |n with..|B \-P.to|
|00002000| 20 74 65 6c 6c 20 74 68 | 65 20 43 20 70 72 65 70 | tell th|e C prep|
|00002010| 72 6f 63 65 73 73 6f 72 | 20 77 68 65 72 65 20 74 |rocessor| where t|
|00002020| 6f 20 6c 6f 6f 6b 20 66 | 6f 72 20 69 6e 63 6c 75 |o look f|or inclu|
|00002030| 64 65 20 66 69 6c 65 73 | 2e 0d 42 79 20 64 65 66 |de files|..By def|
|00002040| 61 75 6c 74 20 2f 75 73 | 72 2f 69 6e 63 6c 75 64 |ault /us|r/includ|
|00002050| 65 20 61 6e 64 20 2f 75 | 73 72 2f 6c 69 62 2f 70 |e and /u|sr/lib/p|
|00002060| 65 72 6c 20 61 72 65 20 | 73 65 61 72 63 68 65 64 |erl are |searched|
|00002070| 2e 0d 2e 54 50 20 35 0d | 2e 42 49 20 5c 2d 6c 20 |...TP 5.|.BI \-l |
|00002080| 6f 63 74 6e 75 6d 0d 65 | 6e 61 62 6c 65 73 20 61 |octnum.e|nables a|
|00002090| 75 74 6f 6d 61 74 69 63 | 20 6c 69 6e 65 2d 65 6e |utomatic| line-en|
|000020a0| 64 69 6e 67 20 70 72 6f | 63 65 73 73 69 6e 67 2e |ding pro|cessing.|
|000020b0| 20 20 49 74 20 68 61 73 | 20 74 77 6f 20 65 66 66 | It has| two eff|
|000020c0| 65 63 74 73 3a 0d 66 69 | 72 73 74 2c 20 69 74 20 |ects:.fi|rst, it |
|000020d0| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 63 68 |automati|cally ch|
|000020e0| 6f 70 73 20 74 68 65 20 | 6c 69 6e 65 20 74 65 72 |ops the |line ter|
|000020f0| 6d 69 6e 61 74 6f 72 20 | 77 68 65 6e 20 75 73 65 |minator |when use|
|00002100| 64 20 77 69 74 68 0d 2e | 42 20 5c 2d 6e 0d 6f 72 |d with..|B \-n.or|
|00002110| 0d 2e 42 20 5c 2d 70 20 | 2c 0d 61 6e 64 20 73 65 |..B \-p |,.and se|
|00002120| 63 6f 6e 64 2c 20 69 74 | 20 61 73 73 69 67 6e 73 |cond, it| assigns|
|00002130| 20 24 5c 65 20 74 6f 20 | 68 61 76 65 20 74 68 65 | $\e to |have the|
|00002140| 20 76 61 6c 75 65 20 6f | 66 0d 2e 49 20 6f 63 74 | value o|f..I oct|
|00002150| 6e 75 6d 0d 73 6f 20 74 | 68 61 74 20 61 6e 79 20 |num.so t|hat any |
|00002160| 70 72 69 6e 74 20 73 74 | 61 74 65 6d 65 6e 74 73 |print st|atements|
|00002170| 20 77 69 6c 6c 20 68 61 | 76 65 20 74 68 61 74 20 | will ha|ve that |
|00002180| 6c 69 6e 65 20 74 65 72 | 6d 69 6e 61 74 6f 72 20 |line ter|minator |
|00002190| 61 64 64 65 64 20 62 61 | 63 6b 20 6f 6e 2e 20 20 |added ba|ck on. |
|000021a0| 49 66 0d 2e 49 20 6f 63 | 74 6e 75 6d 0d 69 73 20 |If..I oc|tnum.is |
|000021b0| 6f 6d 69 74 74 65 64 2c | 20 73 65 74 73 20 24 5c |omitted,| sets $\|
|000021c0| 65 20 74 6f 20 74 68 65 | 20 63 75 72 72 65 6e 74 |e to the| current|
|000021d0| 20 76 61 6c 75 65 20 6f | 66 20 24 2f 2e 0d 46 6f | value o|f $/..Fo|
|000021e0| 72 20 69 6e 73 74 61 6e | 63 65 2c 20 74 6f 20 74 |r instan|ce, to t|
|000021f0| 72 69 6d 20 6c 69 6e 65 | 73 20 74 6f 20 38 30 20 |rim line|s to 80 |
|00002200| 63 6f 6c 75 6d 6e 73 3a | 0d 2e 6e 66 0d 0d 09 70 |columns:|..nf...p|
|00002210| 65 72 6c 20 2d 6c 70 65 | 20 5c 27 73 75 62 73 74 |erl -lpe| \'subst|
|00002220| 72 28 24 5f 2c 20 38 30 | 29 20 3d 20 22 22 5c 27 |r($_, 80|) = ""\'|
|00002230| 0d 0d 2e 66 69 0d 4e 6f | 74 65 20 74 68 61 74 20 |...fi.No|te that |
|00002240| 74 68 65 20 61 73 73 69 | 67 6e 6d 65 6e 74 20 24 |the assi|gnment $|
|00002250| 5c 65 20 3d 20 24 2f 20 | 69 73 20 64 6f 6e 65 20 |\e = $/ |is done |
|00002260| 77 68 65 6e 20 74 68 65 | 20 73 77 69 74 63 68 20 |when the| switch |
|00002270| 69 73 20 70 72 6f 63 65 | 73 73 65 64 2c 0d 73 6f |is proce|ssed,.so|
|00002280| 20 74 68 65 20 69 6e 70 | 75 74 20 72 65 63 6f 72 | the inp|ut recor|
|00002290| 64 20 73 65 70 61 72 61 | 74 6f 72 20 63 61 6e 20 |d separa|tor can |
|000022a0| 62 65 20 64 69 66 66 65 | 72 65 6e 74 20 74 68 61 |be diffe|rent tha|
|000022b0| 6e 20 74 68 65 20 6f 75 | 74 70 75 74 20 72 65 63 |n the ou|tput rec|
|000022c0| 6f 72 64 0d 73 65 70 61 | 72 61 74 6f 72 20 69 66 |ord.sepa|rator if|
|000022d0| 20 74 68 65 0d 2e 42 20 | 5c 2d 6c 0d 73 77 69 74 | the..B |\-l.swit|
|000022e0| 63 68 20 69 73 20 66 6f | 6c 6c 6f 77 65 64 20 62 |ch is fo|llowed b|
|000022f0| 79 20 61 0d 2e 42 20 5c | 2d 30 0d 73 77 69 74 63 |y a..B \|-0.switc|
|00002300| 68 3a 0d 2e 6e 66 0d 0d | 09 67 6e 75 66 69 6e 64 |h:..nf..|.gnufind|
|00002310| 20 2f 20 2d 70 72 69 6e | 74 30 20 7c 20 70 65 72 | / -prin|t0 | per|
|00002320| 6c 20 2d 6c 6e 30 65 20 | 27 70 72 69 6e 74 20 22 |l -ln0e |'print "|
|00002330| 66 6f 75 6e 64 20 24 5f | 22 20 69 66 20 2d 70 27 |found $_|" if -p'|
|00002340| 0d 0d 2e 66 69 0d 54 68 | 69 73 20 73 65 74 73 20 |...fi.Th|is sets |
|00002350| 24 5c 65 20 74 6f 20 6e | 65 77 6c 69 6e 65 20 61 |$\e to n|ewline a|
|00002360| 6e 64 20 74 68 65 6e 20 | 73 65 74 73 20 24 2f 20 |nd then |sets $/ |
|00002370| 74 6f 20 74 68 65 20 6e | 75 6c 6c 20 63 68 61 72 |to the n|ull char|
|00002380| 61 63 74 65 72 2e 0d 2e | 54 50 20 35 0d 2e 42 20 |acter...|TP 5..B |
|00002390| 5c 2d 6e 0d 63 61 75 73 | 65 73 0d 2e 49 20 70 65 |\-n.caus|es..I pe|
|000023a0| 72 6c 0d 74 6f 20 61 73 | 73 75 6d 65 20 74 68 65 |rl.to as|sume the|
|000023b0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6c 6f 6f 70 20 | followi|ng loop |
|000023c0| 61 72 6f 75 6e 64 20 79 | 6f 75 72 20 73 63 72 69 |around y|our scri|
|000023d0| 70 74 2c 20 77 68 69 63 | 68 20 6d 61 6b 65 73 20 |pt, whic|h makes |
|000023e0| 69 74 20 69 74 65 72 61 | 74 65 0d 6f 76 65 72 20 |it itera|te.over |
|000023f0| 66 69 6c 65 6e 61 6d 65 | 20 61 72 67 75 6d 65 6e |filename| argumen|
|00002400| 74 73 20 73 6f 6d 65 77 | 68 61 74 20 6c 69 6b 65 |ts somew|hat like|
|00002410| 20 5c 2a 28 4c 22 73 65 | 64 20 5c 2d 6e 5c 2a 28 | \*(L"se|d \-n\*(|
|00002420| 52 22 20 6f 72 20 5c 66 | 49 61 77 6b 5c 66 52 3a |R" or \f|Iawk\fR:|
|00002430| 0d 2e 6e 66 0d 0d 2e 6e | 65 20 33 0d 09 77 68 69 |..nf...n|e 3..whi|
|00002440| 6c 65 20 28 3c 3e 29 20 | 7b 0d 09 09 2e 5c 7c 2e |le (<>) |{....\|.|
|00002450| 5c 7c 2e 09 09 23 20 79 | 6f 75 72 20 73 63 72 69 |\|...# y|our scri|
|00002460| 70 74 20 67 6f 65 73 20 | 68 65 72 65 0d 09 7d 0d |pt goes |here..}.|
|00002470| 0d 2e 66 69 0d 4e 6f 74 | 65 20 74 68 61 74 20 74 |..fi.Not|e that t|
|00002480| 68 65 20 6c 69 6e 65 73 | 20 61 72 65 20 6e 6f 74 |he lines| are not|
|00002490| 20 70 72 69 6e 74 65 64 | 20 62 79 20 64 65 66 61 | printed| by defa|
|000024a0| 75 6c 74 2e 0d 53 65 65 | 0d 2e 42 20 5c 2d 70 0d |ult..See|..B \-p.|
|000024b0| 74 6f 20 68 61 76 65 20 | 6c 69 6e 65 73 20 70 72 |to have |lines pr|
|000024c0| 69 6e 74 65 64 2e 0d 48 | 65 72 65 20 69 73 20 61 |inted..H|ere is a|
|000024d0| 6e 20 65 66 66 69 63 69 | 65 6e 74 20 77 61 79 20 |n effici|ent way |
|000024e0| 74 6f 20 64 65 6c 65 74 | 65 20 61 6c 6c 20 66 69 |to delet|e all fi|
|000024f0| 6c 65 73 20 6f 6c 64 65 | 72 20 74 68 61 6e 20 61 |les olde|r than a|
|00002500| 20 77 65 65 6b 3a 0d 2e | 6e 66 0d 0d 09 66 69 6e | week:..|nf...fin|
|00002510| 64 20 2e 20 5c 2d 6d 74 | 69 6d 65 20 2b 37 20 5c |d . \-mt|ime +7 \|
|00002520| 2d 70 72 69 6e 74 20 7c | 20 70 65 72 6c 20 5c 2d |-print || perl \-|
|00002530| 6e 6c 65 20 5c 27 75 6e | 6c 69 6e 6b 3b 5c 27 0d |nle \'un|link;\'.|
|00002540| 0d 2e 66 69 0d 54 68 69 | 73 20 69 73 20 66 61 73 |..fi.Thi|s is fas|
|00002550| 74 65 72 20 74 68 61 6e | 20 75 73 69 6e 67 20 74 |ter than| using t|
|00002560| 68 65 20 5c 2d 65 78 65 | 63 20 73 77 69 74 63 68 |he \-exe|c switch|
|00002570| 20 6f 66 20 66 69 6e 64 | 20 62 65 63 61 75 73 65 | of find| because|
|00002580| 20 79 6f 75 20 64 6f 6e | 27 74 20 68 61 76 65 20 | you don|'t have |
|00002590| 74 6f 0d 73 74 61 72 74 | 20 61 20 70 72 6f 63 65 |to.start| a proce|
|000025a0| 73 73 20 6f 6e 20 65 76 | 65 72 79 20 66 69 6c 65 |ss on ev|ery file|
|000025b0| 6e 61 6d 65 20 66 6f 75 | 6e 64 2e 0d 2e 54 50 20 |name fou|nd...TP |
|000025c0| 35 0d 2e 42 20 5c 2d 70 | 0d 63 61 75 73 65 73 0d |5..B \-p|.causes.|
|000025d0| 2e 49 20 70 65 72 6c 0d | 74 6f 20 61 73 73 75 6d |.I perl.|to assum|
|000025e0| 65 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |e the fo|llowing |
|000025f0| 6c 6f 6f 70 20 61 72 6f | 75 6e 64 20 79 6f 75 72 |loop aro|und your|
|00002600| 20 73 63 72 69 70 74 2c | 20 77 68 69 63 68 20 6d | script,| which m|
|00002610| 61 6b 65 73 20 69 74 20 | 69 74 65 72 61 74 65 0d |akes it |iterate.|
|00002620| 6f 76 65 72 20 66 69 6c | 65 6e 61 6d 65 20 61 72 |over fil|ename ar|
|00002630| 67 75 6d 65 6e 74 73 20 | 73 6f 6d 65 77 68 61 74 |guments |somewhat|
|00002640| 20 6c 69 6b 65 20 5c 66 | 49 73 65 64 5c 66 52 3a | like \f|Ised\fR:|
|00002650| 0d 2e 6e 66 0d 0d 2e 6e | 65 20 35 0d 09 77 68 69 |..nf...n|e 5..whi|
|00002660| 6c 65 20 28 3c 3e 29 20 | 7b 0d 09 09 2e 5c 7c 2e |le (<>) |{....\|.|
|00002670| 5c 7c 2e 09 09 23 20 79 | 6f 75 72 20 73 63 72 69 |\|...# y|our scri|
|00002680| 70 74 20 67 6f 65 73 20 | 68 65 72 65 0d 09 7d 20 |pt goes |here..} |
|00002690| 63 6f 6e 74 69 6e 75 65 | 20 7b 0d 09 09 70 72 69 |continue| {...pri|
|000026a0| 6e 74 3b 0d 09 7d 0d 0d | 2e 66 69 0d 4e 6f 74 65 |nt;..}..|.fi.Note|
|000026b0| 20 74 68 61 74 20 74 68 | 65 20 6c 69 6e 65 73 20 | that th|e lines |
|000026c0| 61 72 65 20 70 72 69 6e | 74 65 64 20 61 75 74 6f |are prin|ted auto|
|000026d0| 6d 61 74 69 63 61 6c 6c | 79 2e 0d 54 6f 20 73 75 |maticall|y..To su|
|000026e0| 70 70 72 65 73 73 20 70 | 72 69 6e 74 69 6e 67 20 |ppress p|rinting |
|000026f0| 75 73 65 20 74 68 65 0d | 2e 42 20 5c 2d 6e 0d 73 |use the.|.B \-n.s|
|00002700| 77 69 74 63 68 2e 0d 41 | 0d 2e 42 20 5c 2d 70 0d |witch..A|..B \-p.|
|00002710| 6f 76 65 72 72 69 64 65 | 73 20 61 0d 2e 42 20 5c |override|s a..B \|
|00002720| 2d 6e 0d 73 77 69 74 63 | 68 2e 0d 2e 54 50 20 35 |-n.switc|h...TP 5|
|00002730| 0d 2e 42 20 5c 2d 50 0d | 63 61 75 73 65 73 20 79 |..B \-P.|causes y|
|00002740| 6f 75 72 20 73 63 72 69 | 70 74 20 74 6f 20 62 65 |our scri|pt to be|
|00002750| 20 72 75 6e 20 74 68 72 | 6f 75 67 68 20 74 68 65 | run thr|ough the|
|00002760| 20 43 20 70 72 65 70 72 | 6f 63 65 73 73 6f 72 20 | C prepr|ocessor |
|00002770| 62 65 66 6f 72 65 0d 63 | 6f 6d 70 69 6c 61 74 69 |before.c|ompilati|
|00002780| 6f 6e 20 62 79 0d 2e 49 | 52 20 70 65 72 6c 20 2e |on by..I|R perl .|
|00002790| 0d 28 53 69 6e 63 65 20 | 62 6f 74 68 20 63 6f 6d |.(Since |both com|
|000027a0| 6d 65 6e 74 73 20 61 6e | 64 20 63 70 70 20 64 69 |ments an|d cpp di|
|000027b0| 72 65 63 74 69 76 65 73 | 20 62 65 67 69 6e 20 77 |rectives| begin w|
|000027c0| 69 74 68 20 74 68 65 20 | 23 20 63 68 61 72 61 63 |ith the |# charac|
|000027d0| 74 65 72 2c 0d 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ter,.you| should |
|000027e0| 61 76 6f 69 64 20 73 74 | 61 72 74 69 6e 67 20 63 |avoid st|arting c|
|000027f0| 6f 6d 6d 65 6e 74 73 20 | 77 69 74 68 20 61 6e 79 |omments |with any|
|00002800| 20 77 6f 72 64 73 20 72 | 65 63 6f 67 6e 69 7a 65 | words r|ecognize|
|00002810| 64 0d 62 79 20 74 68 65 | 20 43 20 70 72 65 70 72 |d.by the| C prepr|
|00002820| 6f 63 65 73 73 6f 72 20 | 73 75 63 68 20 61 73 20 |ocessor |such as |
|00002830| 5c 2a 28 4c 22 69 66 5c | 2a 28 52 22 2c 20 5c 2a |\*(L"if\|*(R", \*|
|00002840| 28 4c 22 65 6c 73 65 5c | 2a 28 52 22 20 6f 72 20 |(L"else\|*(R" or |
|00002850| 5c 2a 28 4c 22 64 65 66 | 69 6e 65 5c 2a 28 52 22 |\*(L"def|ine\*(R"|
|00002860| 2e 29 0d 2e 54 50 20 35 | 0d 2e 42 20 5c 2d 73 0d |.)..TP 5|..B \-s.|
|00002870| 65 6e 61 62 6c 65 73 20 | 73 6f 6d 65 20 72 75 64 |enables |some rud|
|00002880| 69 6d 65 6e 74 61 72 79 | 20 73 77 69 74 63 68 20 |imentary| switch |
|00002890| 70 61 72 73 69 6e 67 20 | 66 6f 72 20 73 77 69 74 |parsing |for swit|
|000028a0| 63 68 65 73 20 6f 6e 20 | 74 68 65 20 63 6f 6d 6d |ches on |the comm|
|000028b0| 61 6e 64 20 6c 69 6e 65 | 0d 61 66 74 65 72 20 74 |and line|.after t|
|000028c0| 68 65 20 73 63 72 69 70 | 74 20 6e 61 6d 65 20 62 |he scrip|t name b|
|000028d0| 75 74 20 62 65 66 6f 72 | 65 20 61 6e 79 20 66 69 |ut befor|e any fi|
|000028e0| 6c 65 6e 61 6d 65 20 61 | 72 67 75 6d 65 6e 74 73 |lename a|rguments|
|000028f0| 20 28 6f 72 20 62 65 66 | 6f 72 65 20 61 20 5c 2d | (or bef|ore a \-|
|00002900| 5c 7c 5c 2d 29 2e 0d 41 | 6e 79 20 73 77 69 74 63 |\|\-)..A|ny switc|
|00002910| 68 20 66 6f 75 6e 64 20 | 74 68 65 72 65 20 69 73 |h found |there is|
|00002920| 20 72 65 6d 6f 76 65 64 | 20 66 72 6f 6d 20 40 41 | removed| from @A|
|00002930| 52 47 56 20 61 6e 64 20 | 73 65 74 73 20 74 68 65 |RGV and |sets the|
|00002940| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 76 | corresp|onding v|
|00002950| 61 72 69 61 62 6c 65 20 | 69 6e 20 74 68 65 0d 2e |ariable |in the..|
|00002960| 49 20 70 65 72 6c 0d 73 | 63 72 69 70 74 2e 0d 54 |I perl.s|cript..T|
|00002970| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 73 63 72 |he follo|wing scr|
|00002980| 69 70 74 20 70 72 69 6e | 74 73 20 5c 2a 28 4c 22 |ipt prin|ts \*(L"|
|00002990| 74 72 75 65 5c 2a 28 52 | 22 20 69 66 20 61 6e 64 |true\*(R|" if and|
|000029a0| 20 6f 6e 6c 79 20 69 66 | 20 74 68 65 20 73 63 72 | only if| the scr|
|000029b0| 69 70 74 20 69 73 0d 69 | 6e 76 6f 6b 65 64 20 77 |ipt is.i|nvoked w|
|000029c0| 69 74 68 20 61 20 5c 2d | 78 79 7a 20 73 77 69 74 |ith a \-|xyz swit|
|000029d0| 63 68 2e 0d 2e 6e 66 0d | 0d 2e 6e 65 20 32 0d 09 |ch...nf.|..ne 2..|
|000029e0| 23 21 2f 75 73 72 2f 62 | 69 6e 2f 70 65 72 6c 20 |#!/usr/b|in/perl |
|000029f0| 5c 2d 73 0d 09 69 66 20 | 28 24 78 79 7a 29 20 7b |\-s..if |($xyz) {|
|00002a00| 20 70 72 69 6e 74 20 22 | 74 72 75 65 5c 65 6e 22 | print "|true\en"|
|00002a10| 3b 20 7d 0d 0d 2e 66 69 | 0d 2e 54 50 20 35 0d 2e |; }...fi|..TP 5..|
|00002a20| 42 20 5c 2d 53 0d 6d 61 | 6b 65 73 0d 2e 49 20 70 |B \-S.ma|kes..I p|
|00002a30| 65 72 6c 0d 75 73 65 20 | 74 68 65 20 50 41 54 48 |erl.use |the PATH|
|00002a40| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|00002a50| 69 61 62 6c 65 20 74 6f | 20 73 65 61 72 63 68 20 |iable to| search |
|00002a60| 66 6f 72 20 74 68 65 20 | 73 63 72 69 70 74 0d 28 |for the |script.(|
|00002a70| 75 6e 6c 65 73 73 20 74 | 68 65 20 6e 61 6d 65 20 |unless t|he name |
|00002a80| 6f 66 20 74 68 65 20 73 | 63 72 69 70 74 20 73 74 |of the s|cript st|
|00002a90| 61 72 74 73 20 77 69 74 | 68 20 61 20 73 6c 61 73 |arts wit|h a slas|
|00002aa0| 68 29 2e 0d 54 79 70 69 | 63 61 6c 6c 79 20 74 68 |h)..Typi|cally th|
|00002ab0| 69 73 20 69 73 20 75 73 | 65 64 20 74 6f 20 65 6d |is is us|ed to em|
|00002ac0| 75 6c 61 74 65 20 23 21 | 20 73 74 61 72 74 75 70 |ulate #!| startup|
|00002ad0| 20 6f 6e 20 6d 61 63 68 | 69 6e 65 73 20 74 68 61 | on mach|ines tha|
|00002ae0| 74 20 64 6f 6e 27 74 0d | 73 75 70 70 6f 72 74 20 |t don't.|support |
|00002af0| 23 21 2c 20 69 6e 20 74 | 68 65 20 66 6f 6c 6c 6f |#!, in t|he follo|
|00002b00| 77 69 6e 67 20 6d 61 6e | 6e 65 72 3a 0d 2e 6e 66 |wing man|ner:..nf|
|00002b10| 0d 0d 09 23 21 2f 75 73 | 72 2f 62 69 6e 2f 70 65 |...#!/us|r/bin/pe|
|00002b20| 72 6c 0d 09 65 76 61 6c | 20 22 65 78 65 63 20 2f |rl..eval| "exec /|
|00002b30| 75 73 72 2f 62 69 6e 2f | 70 65 72 6c 20 5c 2d 53 |usr/bin/|perl \-S|
|00002b40| 20 24 30 20 24 2a 22 0d | 09 09 69 66 20 24 72 75 | $0 $*".|..if $ru|
|00002b50| 6e 6e 69 6e 67 5f 75 6e | 64 65 72 5f 73 6f 6d 65 |nning_un|der_some|
|00002b60| 5f 73 68 65 6c 6c 3b 0d | 0d 2e 66 69 0d 54 68 65 |_shell;.|..fi.The|
|00002b70| 20 73 79 73 74 65 6d 20 | 69 67 6e 6f 72 65 73 20 | system |ignores |
|00002b80| 74 68 65 20 66 69 72 73 | 74 20 6c 69 6e 65 20 61 |the firs|t line a|
|00002b90| 6e 64 20 66 65 65 64 73 | 20 74 68 65 20 73 63 72 |nd feeds| the scr|
|00002ba0| 69 70 74 20 74 6f 20 2f | 62 69 6e 2f 73 68 2c 0d |ipt to /|bin/sh,.|
|00002bb0| 77 68 69 63 68 20 70 72 | 6f 63 65 65 64 73 20 74 |which pr|oceeds t|
|00002bc0| 6f 20 74 72 79 20 74 6f | 20 65 78 65 63 75 74 65 |o try to| execute|
|00002bd0| 20 74 68 65 0d 2e 49 20 | 70 65 72 6c 0d 73 63 72 | the..I |perl.scr|
|00002be0| 69 70 74 20 61 73 20 61 | 20 73 68 65 6c 6c 20 73 |ipt as a| shell s|
|00002bf0| 63 72 69 70 74 2e 0d 54 | 68 65 20 73 68 65 6c 6c |cript..T|he shell|
|00002c00| 20 65 78 65 63 75 74 65 | 73 20 74 68 65 20 73 65 | execute|s the se|
|00002c10| 63 6f 6e 64 20 6c 69 6e | 65 20 61 73 20 61 20 6e |cond lin|e as a n|
|00002c20| 6f 72 6d 61 6c 20 73 68 | 65 6c 6c 20 63 6f 6d 6d |ormal sh|ell comm|
|00002c30| 61 6e 64 2c 20 61 6e 64 | 20 74 68 75 73 0d 73 74 |and, and| thus.st|
|00002c40| 61 72 74 73 20 75 70 20 | 74 68 65 0d 2e 49 20 70 |arts up |the..I p|
|00002c50| 65 72 6c 0d 69 6e 74 65 | 72 70 72 65 74 65 72 2e |erl.inte|rpreter.|
|00002c60| 0d 4f 6e 20 73 6f 6d 65 | 20 73 79 73 74 65 6d 73 |.On some| systems|
|00002c70| 20 24 30 20 64 6f 65 73 | 6e 27 74 20 61 6c 77 61 | $0 does|n't alwa|
|00002c80| 79 73 20 63 6f 6e 74 61 | 69 6e 20 74 68 65 20 66 |ys conta|in the f|
|00002c90| 75 6c 6c 20 70 61 74 68 | 6e 61 6d 65 2c 0d 73 6f |ull path|name,.so|
|00002ca0| 20 74 68 65 0d 2e 42 20 | 5c 2d 53 0d 74 65 6c 6c | the..B |\-S.tell|
|00002cb0| 73 0d 2e 49 20 70 65 72 | 6c 0d 74 6f 20 73 65 61 |s..I per|l.to sea|
|00002cc0| 72 63 68 20 66 6f 72 20 | 74 68 65 20 73 63 72 69 |rch for |the scri|
|00002cd0| 70 74 20 69 66 20 6e 65 | 63 65 73 73 61 72 79 2e |pt if ne|cessary.|
|00002ce0| 0d 41 66 74 65 72 0d 2e | 49 20 70 65 72 6c 0d 6c |.After..|I perl.l|
|00002cf0| 6f 63 61 74 65 73 20 74 | 68 65 20 73 63 72 69 70 |ocates t|he scrip|
|00002d00| 74 2c 20 69 74 20 70 61 | 72 73 65 73 20 74 68 65 |t, it pa|rses the|
|00002d10| 20 6c 69 6e 65 73 20 61 | 6e 64 20 69 67 6e 6f 72 | lines a|nd ignor|
|00002d20| 65 73 20 74 68 65 6d 20 | 62 65 63 61 75 73 65 0d |es them |because.|
|00002d30| 74 68 65 20 76 61 72 69 | 61 62 6c 65 20 24 72 75 |the vari|able $ru|
|00002d40| 6e 6e 69 6e 67 5f 75 6e | 64 65 72 5f 73 6f 6d 65 |nning_un|der_some|
|00002d50| 5f 73 68 65 6c 6c 20 69 | 73 20 6e 65 76 65 72 20 |_shell i|s never |
|00002d60| 74 72 75 65 2e 0d 41 20 | 62 65 74 74 65 72 20 63 |true..A |better c|
|00002d70| 6f 6e 73 74 72 75 63 74 | 20 74 68 61 6e 20 24 2a |onstruct| than $*|
|00002d80| 20 77 6f 75 6c 64 20 62 | 65 20 24 7b 31 2b 22 24 | would b|e ${1+"$|
|00002d90| 40 22 7d 2c 20 77 68 69 | 63 68 20 68 61 6e 64 6c |@"}, whi|ch handl|
|00002da0| 65 73 20 65 6d 62 65 64 | 64 65 64 20 73 70 61 63 |es embed|ded spac|
|00002db0| 65 73 0d 61 6e 64 20 73 | 75 63 68 20 69 6e 20 74 |es.and s|uch in t|
|00002dc0| 68 65 20 66 69 6c 65 6e | 61 6d 65 73 2c 20 62 75 |he filen|ames, bu|
|00002dd0| 74 20 64 6f 65 73 6e 27 | 74 20 77 6f 72 6b 20 69 |t doesn'|t work i|
|00002de0| 66 20 74 68 65 20 73 63 | 72 69 70 74 20 69 73 20 |f the sc|ript is |
|00002df0| 62 65 69 6e 67 20 69 6e | 74 65 72 70 72 65 74 65 |being in|terprete|
|00002e00| 64 0d 62 79 20 63 73 68 | 2e 0d 49 6e 20 6f 72 64 |d.by csh|..In ord|
|00002e10| 65 72 20 74 6f 20 73 74 | 61 72 74 20 75 70 20 73 |er to st|art up s|
|00002e20| 68 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 63 73 |h rather| than cs|
|00002e30| 68 2c 20 73 6f 6d 65 20 | 73 79 73 74 65 6d 73 20 |h, some |systems |
|00002e40| 6d 61 79 20 68 61 76 65 | 20 74 6f 20 72 65 70 6c |may have| to repl|
|00002e50| 61 63 65 20 74 68 65 0d | 23 21 20 6c 69 6e 65 20 |ace the.|#! line |
|00002e60| 77 69 74 68 20 61 20 6c | 69 6e 65 20 63 6f 6e 74 |with a l|ine cont|
|00002e70| 61 69 6e 69 6e 67 20 6a | 75 73 74 0d 61 20 63 6f |aining j|ust.a co|
|00002e80| 6c 6f 6e 2c 20 77 68 69 | 63 68 20 77 69 6c 6c 20 |lon, whi|ch will |
|00002e90| 62 65 20 70 6f 6c 69 74 | 65 6c 79 20 69 67 6e 6f |be polit|ely igno|
|00002ea0| 72 65 64 20 62 79 20 70 | 65 72 6c 2e 0d 4f 74 68 |red by p|erl..Oth|
|00002eb0| 65 72 20 73 79 73 74 65 | 6d 73 20 63 61 6e 27 74 |er syste|ms can't|
|00002ec0| 20 63 6f 6e 74 72 6f 6c | 20 74 68 61 74 2c 20 61 | control| that, a|
|00002ed0| 6e 64 20 6e 65 65 64 20 | 61 20 74 6f 74 61 6c 6c |nd need |a totall|
|00002ee0| 79 20 64 65 76 69 6f 75 | 73 20 63 6f 6e 73 74 72 |y deviou|s constr|
|00002ef0| 75 63 74 20 74 68 61 74 | 0d 77 69 6c 6c 20 77 6f |uct that|.will wo|
|00002f00| 72 6b 20 75 6e 64 65 72 | 20 61 6e 79 20 6f 66 20 |rk under| any of |
|00002f10| 63 73 68 2c 20 73 68 20 | 6f 72 20 70 65 72 6c 2c |csh, sh |or perl,|
|00002f20| 20 73 75 63 68 20 61 73 | 20 74 68 65 20 66 6f 6c | such as| the fol|
|00002f30| 6c 6f 77 69 6e 67 3a 0d | 2e 6e 66 0d 0d 2e 6e 65 |lowing:.|.nf...ne|
|00002f40| 20 33 0d 09 65 76 61 6c | 20 27 28 65 78 69 74 20 | 3..eval| '(exit |
|00002f50| 24 3f 30 29 27 20 26 26 | 20 65 76 61 6c 20 27 65 |$?0)' &&| eval 'e|
|00002f60| 78 65 63 20 2f 75 73 72 | 2f 62 69 6e 2f 70 65 72 |xec /usr|/bin/per|
|00002f70| 6c 20 2d 53 20 24 30 20 | 24 7b 31 2b 22 24 40 22 |l -S $0 |${1+"$@"|
|00002f80| 7d 27 0d 09 26 20 65 76 | 61 6c 20 27 65 78 65 63 |}'..& ev|al 'exec|
|00002f90| 20 2f 75 73 72 2f 62 69 | 6e 2f 70 65 72 6c 20 2d | /usr/bi|n/perl -|
|00002fa0| 53 20 24 30 20 24 61 72 | 67 76 3a 71 27 0d 09 09 |S $0 $ar|gv:q'...|
|00002fb0| 69 66 20 30 3b 0d 0d 2e | 66 69 0d 2e 54 50 20 35 |if 0;...|fi..TP 5|
|00002fc0| 0d 2e 42 20 5c 2d 75 0d | 63 61 75 73 65 73 0d 2e |..B \-u.|causes..|
|00002fd0| 49 20 70 65 72 6c 0d 74 | 6f 20 64 75 6d 70 20 63 |I perl.t|o dump c|
|00002fe0| 6f 72 65 20 61 66 74 65 | 72 20 63 6f 6d 70 69 6c |ore afte|r compil|
|00002ff0| 69 6e 67 20 79 6f 75 72 | 20 73 63 72 69 70 74 2e |ing your| script.|
|00003000| 0d 59 6f 75 20 63 61 6e | 20 74 68 65 6e 20 74 61 |.You can| then ta|
|00003010| 6b 65 20 74 68 69 73 20 | 63 6f 72 65 20 64 75 6d |ke this |core dum|
|00003020| 70 20 61 6e 64 20 74 75 | 72 6e 20 69 74 20 69 6e |p and tu|rn it in|
|00003030| 74 6f 20 61 6e 20 65 78 | 65 63 75 74 61 62 6c 65 |to an ex|ecutable|
|00003040| 20 66 69 6c 65 0d 62 79 | 20 75 73 69 6e 67 20 74 | file.by| using t|
|00003050| 68 65 20 75 6e 64 75 6d | 70 20 70 72 6f 67 72 61 |he undum|p progra|
|00003060| 6d 20 28 6e 6f 74 20 73 | 75 70 70 6c 69 65 64 29 |m (not s|upplied)|
|00003070| 2e 0d 54 68 69 73 20 73 | 70 65 65 64 73 20 73 74 |..This s|peeds st|
|00003080| 61 72 74 75 70 20 61 74 | 20 74 68 65 20 65 78 70 |artup at| the exp|
|00003090| 65 6e 73 65 20 6f 66 20 | 73 6f 6d 65 20 64 69 73 |ense of |some dis|
|000030a0| 6b 20 73 70 61 63 65 20 | 28 77 68 69 63 68 20 79 |k space |(which y|
|000030b0| 6f 75 20 63 61 6e 0d 6d | 69 6e 69 6d 69 7a 65 20 |ou can.m|inimize |
|000030c0| 62 79 20 73 74 72 69 70 | 70 69 6e 67 20 74 68 65 |by strip|ping the|
|000030d0| 20 65 78 65 63 75 74 61 | 62 6c 65 29 2e 0d 28 53 | executa|ble)..(S|
|000030e0| 74 69 6c 6c 2c 20 61 20 | 22 68 65 6c 6c 6f 20 77 |till, a |"hello w|
|000030f0| 6f 72 6c 64 22 20 65 78 | 65 63 75 74 61 62 6c 65 |orld" ex|ecutable|
|00003100| 20 63 6f 6d 65 73 20 6f | 75 74 20 74 6f 20 61 62 | comes o|ut to ab|
|00003110| 6f 75 74 20 32 30 30 4b | 20 6f 6e 20 6d 79 20 6d |out 200K| on my m|
|00003120| 61 63 68 69 6e 65 2e 29 | 0d 49 66 20 79 6f 75 20 |achine.)|.If you |
|00003130| 61 72 65 20 67 6f 69 6e | 67 20 74 6f 20 72 75 6e |are goin|g to run|
|00003140| 20 79 6f 75 72 20 65 78 | 65 63 75 74 61 62 6c 65 | your ex|ecutable|
|00003150| 20 61 73 20 61 20 73 65 | 74 2d 69 64 20 70 72 6f | as a se|t-id pro|
|00003160| 67 72 61 6d 20 74 68 65 | 6e 20 79 6f 75 0d 73 68 |gram the|n you.sh|
|00003170| 6f 75 6c 64 20 70 72 6f | 62 61 62 6c 79 20 63 6f |ould pro|bably co|
|00003180| 6d 70 69 6c 65 20 69 74 | 20 75 73 69 6e 67 20 74 |mpile it| using t|
|00003190| 61 69 6e 74 70 65 72 6c | 20 72 61 74 68 65 72 20 |aintperl| rather |
|000031a0| 74 68 61 6e 20 6e 6f 72 | 6d 61 6c 20 70 65 72 6c |than nor|mal perl|
|000031b0| 2e 0d 49 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |..If you| want to|
|000031c0| 20 65 78 65 63 75 74 65 | 20 61 20 70 6f 72 74 69 | execute| a porti|
|000031d0| 6f 6e 20 6f 66 20 79 6f | 75 72 20 73 63 72 69 70 |on of yo|ur scrip|
|000031e0| 74 20 62 65 66 6f 72 65 | 20 64 75 6d 70 69 6e 67 |t before| dumping|
|000031f0| 2c 20 75 73 65 20 74 68 | 65 0d 64 75 6d 70 20 6f |, use th|e.dump o|
|00003200| 70 65 72 61 74 6f 72 20 | 69 6e 73 74 65 61 64 2e |perator |instead.|
|00003210| 0d 4e 6f 74 65 3a 20 61 | 76 61 69 6c 61 62 69 6c |.Note: a|vailabil|
|00003220| 69 74 79 20 6f 66 20 75 | 6e 64 75 6d 70 20 69 73 |ity of u|ndump is|
|00003230| 20 70 6c 61 74 66 6f 72 | 6d 20 73 70 65 63 69 66 | platfor|m specif|
|00003240| 69 63 20 61 6e 64 20 6d | 61 79 20 6e 6f 74 20 62 |ic and m|ay not b|
|00003250| 65 20 61 76 61 69 6c 61 | 62 6c 65 0d 66 6f 72 20 |e availa|ble.for |
|00003260| 61 20 73 70 65 63 69 66 | 69 63 20 70 6f 72 74 20 |a specif|ic port |
|00003270| 6f 66 20 70 65 72 6c 2e | 0d 2e 54 50 20 35 0d 2e |of perl.|..TP 5..|
|00003280| 42 20 5c 2d 55 0d 61 6c | 6c 6f 77 73 0d 2e 49 20 |B \-U.al|lows..I |
|00003290| 70 65 72 6c 0d 74 6f 20 | 64 6f 20 75 6e 73 61 66 |perl.to |do unsaf|
|000032a0| 65 20 6f 70 65 72 61 74 | 69 6f 6e 73 2e 0d 43 75 |e operat|ions..Cu|
|000032b0| 72 72 65 6e 74 6c 79 20 | 74 68 65 20 6f 6e 6c 79 |rrently |the only|
|000032c0| 20 5c 2a 28 4c 22 75 6e | 73 61 66 65 5c 2a 28 52 | \*(L"un|safe\*(R|
|000032d0| 22 20 6f 70 65 72 61 74 | 69 6f 6e 73 20 61 72 65 |" operat|ions are|
|000032e0| 20 74 68 65 20 75 6e 6c | 69 6e 6b 69 6e 67 20 6f | the unl|inking o|
|000032f0| 66 20 64 69 72 65 63 74 | 6f 72 69 65 73 20 77 68 |f direct|ories wh|
|00003300| 69 6c 65 0d 72 75 6e 6e | 69 6e 67 20 61 73 20 73 |ile.runn|ing as s|
|00003310| 75 70 65 72 75 73 65 72 | 2c 20 61 6e 64 20 72 75 |uperuser|, and ru|
|00003320| 6e 6e 69 6e 67 20 73 65 | 74 75 69 64 20 70 72 6f |nning se|tuid pro|
|00003330| 67 72 61 6d 73 20 77 69 | 74 68 20 66 61 74 61 6c |grams wi|th fatal|
|00003340| 20 74 61 69 6e 74 20 63 | 68 65 63 6b 73 0d 74 75 | taint c|hecks.tu|
|00003350| 72 6e 65 64 20 69 6e 74 | 6f 20 77 61 72 6e 69 6e |rned int|o warnin|
|00003360| 67 73 2e 0d 2e 54 50 20 | 35 0d 2e 42 20 5c 2d 76 |gs...TP |5..B \-v|
|00003370| 0d 70 72 69 6e 74 73 20 | 74 68 65 20 76 65 72 73 |.prints |the vers|
|00003380| 69 6f 6e 20 61 6e 64 20 | 70 61 74 63 68 6c 65 76 |ion and |patchlev|
|00003390| 65 6c 20 6f 66 20 79 6f | 75 72 0d 2e 49 20 70 65 |el of yo|ur..I pe|
|000033a0| 72 6c 0d 65 78 65 63 75 | 74 61 62 6c 65 2e 0d 2e |rl.execu|table...|
|000033b0| 54 50 20 35 0d 2e 42 20 | 5c 2d 77 0d 70 72 69 6e |TP 5..B |\-w.prin|
|000033c0| 74 73 20 77 61 72 6e 69 | 6e 67 73 20 61 62 6f 75 |ts warni|ngs abou|
|000033d0| 74 20 69 64 65 6e 74 69 | 66 69 65 72 73 20 74 68 |t identi|fiers th|
|000033e0| 61 74 20 61 72 65 20 6d | 65 6e 74 69 6f 6e 65 64 |at are m|entioned|
|000033f0| 20 6f 6e 6c 79 20 6f 6e | 63 65 2c 20 61 6e 64 20 | only on|ce, and |
|00003400| 73 63 61 6c 61 72 0d 76 | 61 72 69 61 62 6c 65 73 |scalar.v|ariables|
|00003410| 20 74 68 61 74 20 61 72 | 65 20 75 73 65 64 20 62 | that ar|e used b|
|00003420| 65 66 6f 72 65 20 62 65 | 69 6e 67 20 73 65 74 2e |efore be|ing set.|
|00003430| 0d 41 6c 73 6f 20 77 61 | 72 6e 73 20 61 62 6f 75 |.Also wa|rns abou|
|00003440| 74 20 72 65 64 65 66 69 | 6e 65 64 20 73 75 62 72 |t redefi|ned subr|
|00003450| 6f 75 74 69 6e 65 73 2c | 20 61 6e 64 20 72 65 66 |outines,| and ref|
|00003460| 65 72 65 6e 63 65 73 20 | 74 6f 20 75 6e 64 65 66 |erences |to undef|
|00003470| 69 6e 65 64 0d 66 69 6c | 65 68 61 6e 64 6c 65 73 |ined.fil|ehandles|
|00003480| 20 6f 72 20 66 69 6c 65 | 68 61 6e 64 6c 65 73 20 | or file|handles |
|00003490| 6f 70 65 6e 65 64 20 72 | 65 61 64 6f 6e 6c 79 20 |opened r|eadonly |
|000034a0| 74 68 61 74 20 79 6f 75 | 20 61 72 65 20 61 74 74 |that you| are att|
|000034b0| 65 6d 70 74 69 6e 67 20 | 74 6f 0d 77 72 69 74 65 |empting |to.write|
|000034c0| 20 6f 6e 2e 0d 41 6c 73 | 6f 20 77 61 72 6e 73 20 | on..Als|o warns |
|000034d0| 79 6f 75 20 69 66 20 79 | 6f 75 20 75 73 65 20 3d |you if y|ou use =|
|000034e0| 3d 20 6f 6e 20 76 61 6c | 75 65 73 20 74 68 61 74 |= on val|ues that|
|000034f0| 20 64 6f 6e 27 74 20 6c | 6f 6f 6b 20 6c 69 6b 65 | don't l|ook like|
|00003500| 20 6e 75 6d 62 65 72 73 | 2c 20 61 6e 64 20 69 66 | numbers|, and if|
|00003510| 0d 79 6f 75 72 20 73 75 | 62 72 6f 75 74 69 6e 65 |.your su|broutine|
|00003520| 73 20 72 65 63 75 72 73 | 65 20 6d 6f 72 65 20 74 |s recurs|e more t|
|00003530| 68 61 6e 20 31 30 30 20 | 64 65 65 70 2e 0d 2e 54 |han 100 |deep...T|
|00003540| 50 20 35 0d 2e 42 49 20 | 5c 2d 78 20 64 69 72 65 |P 5..BI |\-x dire|
|00003550| 63 74 6f 72 79 0d 74 65 | 6c 6c 73 0d 2e 49 20 70 |ctory.te|lls..I p|
|00003560| 65 72 6c 0d 74 68 61 74 | 20 74 68 65 20 73 63 72 |erl.that| the scr|
|00003570| 69 70 74 20 69 73 20 65 | 6d 62 65 64 64 65 64 20 |ipt is e|mbedded |
|00003580| 69 6e 20 61 20 6d 65 73 | 73 61 67 65 2e 0d 4c 65 |in a mes|sage..Le|
|00003590| 61 64 69 6e 67 20 67 61 | 72 62 61 67 65 20 77 69 |ading ga|rbage wi|
|000035a0| 6c 6c 20 62 65 20 64 69 | 73 63 61 72 64 65 64 20 |ll be di|scarded |
|000035b0| 75 6e 74 69 6c 20 74 68 | 65 20 66 69 72 73 74 20 |until th|e first |
|000035c0| 6c 69 6e 65 20 74 68 61 | 74 20 73 74 61 72 74 73 |line tha|t starts|
|000035d0| 0d 77 69 74 68 20 23 21 | 20 61 6e 64 20 63 6f 6e |.with #!| and con|
|000035e0| 74 61 69 6e 73 20 74 68 | 65 20 73 74 72 69 6e 67 |tains th|e string|
|000035f0| 20 22 70 65 72 6c 22 2e | 0d 41 6e 79 20 6d 65 61 | "perl".|.Any mea|
|00003600| 6e 69 6e 67 66 75 6c 20 | 73 77 69 74 63 68 65 73 |ningful |switches|
|00003610| 20 6f 6e 20 74 68 61 74 | 20 6c 69 6e 65 20 77 69 | on that| line wi|
|00003620| 6c 6c 20 62 65 20 61 70 | 70 6c 69 65 64 20 28 62 |ll be ap|plied (b|
|00003630| 75 74 20 6f 6e 6c 79 20 | 6f 6e 65 0d 67 72 6f 75 |ut only |one.grou|
|00003640| 70 20 6f 66 20 73 77 69 | 74 63 68 65 73 2c 20 61 |p of swi|tches, a|
|00003650| 73 20 77 69 74 68 20 6e | 6f 72 6d 61 6c 20 23 21 |s with n|ormal #!|
|00003660| 20 70 72 6f 63 65 73 73 | 69 6e 67 29 2e 0d 49 66 | process|ing)..If|
|00003670| 20 61 20 64 69 72 65 63 | 74 6f 72 79 20 6e 61 6d | a direc|tory nam|
|00003680| 65 20 69 73 20 73 70 65 | 63 69 66 69 65 64 2c 20 |e is spe|cified, |
|00003690| 50 65 72 6c 20 77 69 6c | 6c 20 73 77 69 74 63 68 |Perl wil|l switch|
|000036a0| 20 74 6f 20 74 68 61 74 | 20 64 69 72 65 63 74 6f | to that| directo|
|000036b0| 72 79 0d 62 65 66 6f 72 | 65 20 72 75 6e 6e 69 6e |ry.befor|e runnin|
|000036c0| 67 20 74 68 65 20 73 63 | 72 69 70 74 2e 0d 54 68 |g the sc|ript..Th|
|000036d0| 65 0d 2e 42 20 5c 2d 78 | 0d 73 77 69 74 63 68 20 |e..B \-x|.switch |
|000036e0| 6f 6e 6c 79 20 63 6f 6e | 74 72 6f 6c 73 20 74 68 |only con|trols th|
|000036f0| 65 20 74 68 65 20 64 69 | 73 70 6f 73 61 6c 20 6f |e the di|sposal o|
|00003700| 66 20 6c 65 61 64 69 6e | 67 20 67 61 72 62 61 67 |f leadin|g garbag|
|00003710| 65 2e 0d 54 68 65 20 73 | 63 72 69 70 74 20 6d 75 |e..The s|cript mu|
|00003720| 73 74 20 62 65 20 74 65 | 72 6d 69 6e 61 74 65 64 |st be te|rminated|
|00003730| 20 77 69 74 68 20 5f 5c | 7c 5f 45 4e 44 5f 5c 7c | with _\||_END_\||
|00003740| 5f 20 69 66 20 74 68 65 | 72 65 20 69 73 20 74 72 |_ if the|re is tr|
|00003750| 61 69 6c 69 6e 67 20 67 | 61 72 62 61 67 65 0d 74 |ailing g|arbage.t|
|00003760| 6f 20 62 65 20 69 67 6e | 6f 72 65 64 20 28 74 68 |o be ign|ored (th|
|00003770| 65 20 73 63 72 69 70 74 | 20 63 61 6e 20 70 72 6f |e script| can pro|
|00003780| 63 65 73 73 20 61 6e 79 | 20 6f 72 20 61 6c 6c 20 |cess any| or all |
|00003790| 6f 66 20 74 68 65 20 74 | 72 61 69 6c 69 6e 67 20 |of the t|railing |
|000037a0| 67 61 72 62 61 67 65 0d | 76 69 61 20 74 68 65 20 |garbage.|via the |
|000037b0| 44 41 54 41 20 66 69 6c | 65 68 61 6e 64 6c 65 20 |DATA fil|ehandle |
|000037c0| 69 66 20 64 65 73 69 72 | 65 64 29 2e 0d 2e 53 68 |if desir|ed)...Sh|
|000037d0| 20 22 44 61 74 61 20 54 | 79 70 65 73 20 61 6e 64 | "Data T|ypes and|
|000037e0| 20 4f 62 6a 65 63 74 73 | 22 0d 2e 50 50 0d 2e 49 | Objects|"..PP..I|
|000037f0| 20 50 65 72 6c 0d 68 61 | 73 20 74 68 72 65 65 20 | Perl.ha|s three |
|00003800| 64 61 74 61 20 74 79 70 | 65 73 3a 20 73 63 61 6c |data typ|es: scal|
|00003810| 61 72 73 2c 20 61 72 72 | 61 79 73 20 6f 66 20 73 |ars, arr|ays of s|
|00003820| 63 61 6c 61 72 73 2c 20 | 61 6e 64 0d 61 73 73 6f |calars, |and.asso|
|00003830| 63 69 61 74 69 76 65 20 | 61 72 72 61 79 73 20 6f |ciative |arrays o|
|00003840| 66 20 73 63 61 6c 61 72 | 73 2e 0d 4e 6f 72 6d 61 |f scalar|s..Norma|
|00003850| 6c 20 61 72 72 61 79 73 | 20 61 72 65 20 69 6e 64 |l arrays| are ind|
|00003860| 65 78 65 64 20 62 79 20 | 6e 75 6d 62 65 72 2c 20 |exed by |number, |
|00003870| 61 6e 64 20 61 73 73 6f | 63 69 61 74 69 76 65 20 |and asso|ciative |
|00003880| 61 72 72 61 79 73 20 62 | 79 20 73 74 72 69 6e 67 |arrays b|y string|
|00003890| 2e 0d 2e 50 50 0d 54 68 | 65 20 69 6e 74 65 72 70 |...PP.Th|e interp|
|000038a0| 72 65 74 61 74 69 6f 6e | 20 6f 66 20 6f 70 65 72 |retation| of oper|
|000038b0| 61 74 69 6f 6e 73 20 61 | 6e 64 20 76 61 6c 75 65 |ations a|nd value|
|000038c0| 73 20 69 6e 20 70 65 72 | 6c 20 73 6f 6d 65 74 69 |s in per|l someti|
|000038d0| 6d 65 73 0d 64 65 70 65 | 6e 64 73 20 6f 6e 20 74 |mes.depe|nds on t|
|000038e0| 68 65 20 72 65 71 75 69 | 72 65 6d 65 6e 74 73 0d |he requi|rements.|
|000038f0| 6f 66 20 74 68 65 20 63 | 6f 6e 74 65 78 74 20 61 |of the c|ontext a|
|00003900| 72 6f 75 6e 64 20 74 68 | 65 20 6f 70 65 72 61 74 |round th|e operat|
|00003910| 69 6f 6e 20 6f 72 20 76 | 61 6c 75 65 2e 0d 54 68 |ion or v|alue..Th|
|00003920| 65 72 65 20 61 72 65 20 | 74 68 72 65 65 20 6d 61 |ere are |three ma|
|00003930| 6a 6f 72 20 63 6f 6e 74 | 65 78 74 73 3a 20 73 74 |jor cont|exts: st|
|00003940| 72 69 6e 67 2c 20 6e 75 | 6d 65 72 69 63 20 61 6e |ring, nu|meric an|
|00003950| 64 20 61 72 72 61 79 2e | 0d 43 65 72 74 61 69 6e |d array.|.Certain|
|00003960| 20 6f 70 65 72 61 74 69 | 6f 6e 73 20 72 65 74 75 | operati|ons retu|
|00003970| 72 6e 20 61 72 72 61 79 | 20 76 61 6c 75 65 73 0d |rn array| values.|
|00003980| 69 6e 20 63 6f 6e 74 65 | 78 74 73 20 77 61 6e 74 |in conte|xts want|
|00003990| 69 6e 67 20 61 6e 20 61 | 72 72 61 79 2c 20 61 6e |ing an a|rray, an|
|000039a0| 64 20 73 63 61 6c 61 72 | 20 76 61 6c 75 65 73 20 |d scalar| values |
|000039b0| 6f 74 68 65 72 77 69 73 | 65 2e 0d 28 49 66 20 74 |otherwis|e..(If t|
|000039c0| 68 69 73 20 69 73 20 74 | 72 75 65 20 6f 66 20 61 |his is t|rue of a|
|000039d0| 6e 20 6f 70 65 72 61 74 | 69 6f 6e 20 69 74 20 77 |n operat|ion it w|
|000039e0| 69 6c 6c 20 62 65 20 6d | 65 6e 74 69 6f 6e 65 64 |ill be m|entioned|
|000039f0| 20 69 6e 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 | in the |document|
|00003a00| 61 74 69 6f 6e 0d 66 6f | 72 20 74 68 61 74 20 6f |ation.fo|r that o|
|00003a10| 70 65 72 61 74 69 6f 6e | 2e 29 0d 4f 70 65 72 61 |peration|.).Opera|
|00003a20| 74 69 6f 6e 73 20 77 68 | 69 63 68 20 72 65 74 75 |tions wh|ich retu|
|00003a30| 72 6e 20 73 63 61 6c 61 | 72 73 20 64 6f 6e 27 74 |rn scala|rs don't|
|00003a40| 20 63 61 72 65 20 77 68 | 65 74 68 65 72 20 74 68 | care wh|ether th|
|00003a50| 65 20 63 6f 6e 74 65 78 | 74 20 69 73 20 6c 6f 6f |e contex|t is loo|
|00003a60| 6b 69 6e 67 0d 66 6f 72 | 20 61 20 73 74 72 69 6e |king.for| a strin|
|00003a70| 67 20 6f 72 20 61 20 6e | 75 6d 62 65 72 2c 20 62 |g or a n|umber, b|
|00003a80| 75 74 0d 73 63 61 6c 61 | 72 20 76 61 72 69 61 62 |ut.scala|r variab|
|00003a90| 6c 65 73 20 61 6e 64 20 | 76 61 6c 75 65 73 20 61 |les and |values a|
|00003aa0| 72 65 20 69 6e 74 65 72 | 70 72 65 74 65 64 20 61 |re inter|preted a|
|00003ab0| 73 20 73 74 72 69 6e 67 | 73 20 6f 72 20 6e 75 6d |s string|s or num|
|00003ac0| 62 65 72 73 0d 61 73 20 | 61 70 70 72 6f 70 72 69 |bers.as |appropri|
|00003ad0| 61 74 65 20 74 6f 20 74 | 68 65 20 63 6f 6e 74 65 |ate to t|he conte|
|00003ae0| 78 74 2e 0d 41 20 73 63 | 61 6c 61 72 20 69 73 20 |xt..A sc|alar is |
|00003af0| 69 6e 74 65 72 70 72 65 | 74 65 64 20 61 73 20 54 |interpre|ted as T|
|00003b00| 52 55 45 20 69 6e 20 74 | 68 65 20 62 6f 6f 6c 65 |RUE in t|he boole|
|00003b10| 61 6e 20 73 65 6e 73 65 | 20 69 66 20 69 74 20 69 |an sense| if it i|
|00003b20| 73 20 6e 6f 74 20 74 68 | 65 20 6e 75 6c 6c 0d 73 |s not th|e null.s|
|00003b30| 74 72 69 6e 67 20 6f 72 | 20 30 2e 0d 42 6f 6f 6c |tring or| 0..Bool|
|00003b40| 65 61 6e 73 20 72 65 74 | 75 72 6e 65 64 20 62 79 |eans ret|urned by|
|00003b50| 20 6f 70 65 72 61 74 6f | 72 73 20 61 72 65 20 31 | operato|rs are 1|
|00003b60| 20 66 6f 72 20 74 72 75 | 65 20 61 6e 64 20 30 20 | for tru|e and 0 |
|00003b70| 6f 72 20 5c 27 5c 27 20 | 28 74 68 65 20 6e 75 6c |or \'\' |(the nul|
|00003b80| 6c 0d 73 74 72 69 6e 67 | 29 20 66 6f 72 20 66 61 |l.string|) for fa|
|00003b90| 6c 73 65 2e 0d 2e 50 50 | 0d 54 68 65 72 65 20 61 |lse...PP|.There a|
|00003ba0| 72 65 20 61 63 74 75 61 | 6c 6c 79 20 74 77 6f 20 |re actua|lly two |
|00003bb0| 76 61 72 69 65 74 69 65 | 73 20 6f 66 20 6e 75 6c |varietie|s of nul|
|00003bc0| 6c 20 73 74 72 69 6e 67 | 3a 20 64 65 66 69 6e 65 |l string|: define|
|00003bd0| 64 20 61 6e 64 20 75 6e | 64 65 66 69 6e 65 64 2e |d and un|defined.|
|00003be0| 0d 55 6e 64 65 66 69 6e | 65 64 20 6e 75 6c 6c 20 |.Undefin|ed null |
|00003bf0| 73 74 72 69 6e 67 73 20 | 61 72 65 20 72 65 74 75 |strings |are retu|
|00003c00| 72 6e 65 64 20 77 68 65 | 6e 20 74 68 65 72 65 20 |rned whe|n there |
|00003c10| 69 73 20 6e 6f 20 72 65 | 61 6c 20 76 61 6c 75 65 |is no re|al value|
|00003c20| 20 66 6f 72 20 73 6f 6d | 65 74 68 69 6e 67 2c 0d | for som|ething,.|
|00003c30| 73 75 63 68 20 61 73 20 | 77 68 65 6e 20 74 68 65 |such as |when the|
|00003c40| 72 65 20 77 61 73 20 61 | 6e 20 65 72 72 6f 72 2c |re was a|n error,|
|00003c50| 20 6f 72 20 61 74 20 65 | 6e 64 20 6f 66 20 66 69 | or at e|nd of fi|
|00003c60| 6c 65 2c 20 6f 72 20 77 | 68 65 6e 20 79 6f 75 20 |le, or w|hen you |
|00003c70| 72 65 66 65 72 0d 74 6f | 20 61 6e 20 75 6e 69 6e |refer.to| an unin|
|00003c80| 69 74 69 61 6c 69 7a 65 | 64 20 76 61 72 69 61 62 |itialize|d variab|
|00003c90| 6c 65 20 6f 72 20 65 6c | 65 6d 65 6e 74 20 6f 66 |le or el|ement of|
|00003ca0| 20 61 6e 20 61 72 72 61 | 79 2e 0d 41 6e 20 75 6e | an arra|y..An un|
|00003cb0| 64 65 66 69 6e 65 64 20 | 6e 75 6c 6c 20 73 74 72 |defined |null str|
|00003cc0| 69 6e 67 20 6d 61 79 20 | 62 65 63 6f 6d 65 20 64 |ing may |become d|
|00003cd0| 65 66 69 6e 65 64 20 74 | 68 65 20 66 69 72 73 74 |efined t|he first|
|00003ce0| 20 74 69 6d 65 20 79 6f | 75 20 61 63 63 65 73 73 | time yo|u access|
|00003cf0| 20 69 74 2c 20 62 75 74 | 0d 70 72 69 6f 72 20 74 | it, but|.prior t|
|00003d00| 6f 20 74 68 61 74 20 79 | 6f 75 20 63 61 6e 20 75 |o that y|ou can u|
|00003d10| 73 65 20 74 68 65 20 64 | 65 66 69 6e 65 64 28 29 |se the d|efined()|
|00003d20| 20 6f 70 65 72 61 74 6f | 72 20 74 6f 20 64 65 74 | operato|r to det|
|00003d30| 65 72 6d 69 6e 65 20 77 | 68 65 74 68 65 72 20 74 |ermine w|hether t|
|00003d40| 68 65 0d 76 61 6c 75 65 | 20 69 73 20 64 65 66 69 |he.value| is defi|
|00003d50| 6e 65 64 20 6f 72 20 6e | 6f 74 2e 0d 2e 50 50 0d |ned or n|ot...PP.|
|00003d60| 52 65 66 65 72 65 6e 63 | 65 73 20 74 6f 20 73 63 |Referenc|es to sc|
|00003d70| 61 6c 61 72 20 76 61 72 | 69 61 62 6c 65 73 20 61 |alar var|iables a|
|00003d80| 6c 77 61 79 73 20 62 65 | 67 69 6e 20 77 69 74 68 |lways be|gin with|
|00003d90| 20 5c 2a 28 4c 27 24 5c | 2a 28 52 27 2c 20 65 76 | \*(L'$\|*(R', ev|
|00003da0| 65 6e 20 77 68 65 6e 20 | 72 65 66 65 72 72 69 6e |en when |referrin|
|00003db0| 67 0d 74 6f 20 61 20 73 | 63 61 6c 61 72 20 74 68 |g.to a s|calar th|
|00003dc0| 61 74 20 69 73 20 70 61 | 72 74 20 6f 66 20 61 6e |at is pa|rt of an|
|00003dd0| 20 61 72 72 61 79 2e 0d | 54 68 75 73 3a 0d 2e 6e | array..|Thus:..n|
|00003de0| 66 0d 0d 2e 6e 65 20 33 | 0d 20 20 20 20 24 64 61 |f...ne 3|. $da|
|00003df0| 79 73 09 5c 68 27 7c 32 | 69 27 23 20 61 20 73 69 |ys.\h'|2|i'# a si|
|00003e00| 6d 70 6c 65 20 73 63 61 | 6c 61 72 20 76 61 72 69 |mple sca|lar vari|
|00003e10| 61 62 6c 65 0d 20 20 20 | 20 24 64 61 79 73 5b 32 |able. | $days[2|
|00003e20| 38 5d 09 5c 68 27 7c 32 | 69 27 23 20 32 39 74 68 |8].\h'|2|i'# 29th|
|00003e30| 20 65 6c 65 6d 65 6e 74 | 20 6f 66 20 61 72 72 61 | element| of arra|
|00003e40| 79 20 40 64 61 79 73 0d | 20 20 20 20 24 64 61 79 |y @days.| $day|
|00003e50| 73 7b 5c 27 46 65 62 5c | 27 7d 5c 68 27 7c 32 69 |s{\'Feb\|'}\h'|2i|
|00003e60| 27 23 20 6f 6e 65 20 76 | 61 6c 75 65 20 66 72 6f |'# one v|alue fro|
|00003e70| 6d 20 61 6e 20 61 73 73 | 6f 63 69 61 74 69 76 65 |m an ass|ociative|
|00003e80| 20 61 72 72 61 79 0d 20 | 20 20 20 24 23 64 61 79 | array. | $#day|
|00003e90| 73 09 5c 68 27 7c 32 69 | 27 23 20 6c 61 73 74 20 |s.\h'|2i|'# last |
|00003ea0| 69 6e 64 65 78 20 6f 66 | 20 61 72 72 61 79 20 40 |index of| array @|
|00003eb0| 64 61 79 73 0d 0d 62 75 | 74 20 65 6e 74 69 72 65 |days..bu|t entire|
|00003ec0| 20 61 72 72 61 79 73 20 | 6f 72 20 61 72 72 61 79 | arrays |or array|
|00003ed0| 20 73 6c 69 63 65 73 20 | 61 72 65 20 64 65 6e 6f | slices |are deno|
|00003ee0| 74 65 64 20 62 79 20 5c | 2a 28 4c 27 40 5c 2a 28 |ted by \|*(L'@\*(|
|00003ef0| 52 27 3a 0d 0d 20 20 20 | 20 40 64 61 79 73 09 5c |R':.. | @days.\|
|00003f00| 68 27 7c 32 69 27 23 20 | 28 24 64 61 79 73 5b 30 |h'|2i'# |($days[0|
|00003f10| 5d 2c 20 24 64 61 79 73 | 5b 31 5d 2c 5c 7c 2e 5c |], $days|[1],\|.\|
|00003f20| 7c 2e 5c 7c 2e 20 24 64 | 61 79 73 5b 6e 5d 29 0d ||.\|. $d|ays[n]).|
|00003f30| 20 20 20 20 40 64 61 79 | 73 5b 33 2c 34 2c 35 5d | @day|s[3,4,5]|
|00003f40| 5c 68 27 7c 32 69 27 23 | 20 73 61 6d 65 20 61 73 |\h'|2i'#| same as|
|00003f50| 20 40 64 61 79 73 5b 33 | 2e 5c 7c 2e 35 5d 0d 20 | @days[3|.\|.5]. |
|00003f60| 20 20 20 40 64 61 79 73 | 7b 27 61 27 2c 27 63 27 | @days|{'a','c'|
|00003f70| 7d 5c 68 27 7c 32 69 27 | 23 20 73 61 6d 65 20 61 |}\h'|2i'|# same a|
|00003f80| 73 20 28 24 64 61 79 73 | 7b 27 61 27 7d 2c 24 64 |s ($days|{'a'},$d|
|00003f90| 61 79 73 7b 27 63 27 7d | 29 0d 0d 61 6e 64 20 65 |ays{'c'}|)..and e|
|00003fa0| 6e 74 69 72 65 20 61 73 | 73 6f 63 69 61 74 69 76 |ntire as|sociativ|
|00003fb0| 65 20 61 72 72 61 79 73 | 20 61 72 65 20 64 65 6e |e arrays| are den|
|00003fc0| 6f 74 65 64 20 62 79 20 | 5c 2a 28 4c 27 25 5c 2a |oted by |\*(L'%\*|
|00003fd0| 28 52 27 3a 0d 0d 20 20 | 20 20 25 64 61 79 73 09 |(R':.. | %days.|
|00003fe0| 5c 68 27 7c 32 69 27 23 | 20 28 6b 65 79 31 2c 20 |\h'|2i'#| (key1, |
|00003ff0| 76 61 6c 31 2c 20 6b 65 | 79 32 2c 20 76 61 6c 32 |val1, ke|y2, val2|
|00004000| 20 2e 5c 7c 2e 5c 7c 2e | 29 0d 2e 66 69 0d 2e 50 | .\|.\|.|)..fi..P|
|00004010| 50 0d 41 6e 79 20 6f 66 | 20 74 68 65 73 65 20 65 |P.Any of| these e|
|00004020| 69 67 68 74 20 63 6f 6e | 73 74 72 75 63 74 73 20 |ight con|structs |
|00004030| 6d 61 79 20 73 65 72 76 | 65 20 61 73 20 61 6e 20 |may serv|e as an |
|00004040| 6c 76 61 6c 75 65 2c 0d | 74 68 61 74 20 69 73 2c |lvalue,.|that is,|
|00004050| 20 6d 61 79 20 62 65 20 | 61 73 73 69 67 6e 65 64 | may be |assigned|
|00004060| 20 74 6f 2e 0d 28 49 74 | 20 61 6c 73 6f 20 74 75 | to..(It| also tu|
|00004070| 72 6e 73 20 6f 75 74 20 | 74 68 61 74 20 61 6e 20 |rns out |that an |
|00004080| 61 73 73 69 67 6e 6d 65 | 6e 74 20 69 73 20 69 74 |assignme|nt is it|
|00004090| 73 65 6c 66 20 61 6e 20 | 6c 76 61 6c 75 65 20 69 |self an |lvalue i|
|000040a0| 6e 0d 63 65 72 74 61 69 | 6e 20 63 6f 6e 74 65 78 |n.certai|n contex|
|000040b0| 74 73 5c 2a 28 2d 2d 73 | 65 65 20 65 78 61 6d 70 |ts\*(--s|ee examp|
|000040c0| 6c 65 73 20 75 6e 64 65 | 72 20 73 2c 20 74 72 20 |les unde|r s, tr |
|000040d0| 61 6e 64 20 63 68 6f 70 | 2e 29 0d 41 73 73 69 67 |and chop|.).Assig|
|000040e0| 6e 6d 65 6e 74 20 74 6f | 20 61 20 73 63 61 6c 61 |nment to| a scala|
|000040f0| 72 20 65 76 61 6c 75 61 | 74 65 73 20 74 68 65 20 |r evalua|tes the |
|00004100| 72 69 67 68 74 68 61 6e | 64 20 73 69 64 65 20 69 |righthan|d side i|
|00004110| 6e 20 61 20 73 63 61 6c | 61 72 20 63 6f 6e 74 65 |n a scal|ar conte|
|00004120| 78 74 2c 0d 77 68 69 6c | 65 20 61 73 73 69 67 6e |xt,.whil|e assign|
|00004130| 6d 65 6e 74 20 74 6f 20 | 61 6e 20 61 72 72 61 79 |ment to |an array|
|00004140| 20 6f 72 20 61 72 72 61 | 79 20 73 6c 69 63 65 20 | or arra|y slice |
|00004150| 65 76 61 6c 75 61 74 65 | 73 20 74 68 65 20 72 69 |evaluate|s the ri|
|00004160| 67 68 74 68 61 6e 64 20 | 73 69 64 65 0d 69 6e 20 |ghthand |side.in |
|00004170| 61 6e 20 61 72 72 61 79 | 20 63 6f 6e 74 65 78 74 |an array| context|
|00004180| 2e 0d 2e 50 50 0d 59 6f | 75 20 6d 61 79 20 66 69 |...PP.Yo|u may fi|
|00004190| 6e 64 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |nd the l|ength of|
|000041a0| 20 61 72 72 61 79 20 40 | 64 61 79 73 20 62 79 20 | array @|days by |
|000041b0| 65 76 61 6c 75 61 74 69 | 6e 67 0d 5c 2a 28 4c 22 |evaluati|ng.\*(L"|
|000041c0| 24 23 64 61 79 73 5c 2a | 28 52 22 2c 20 61 73 20 |$#days\*|(R", as |
|000041d0| 69 6e 0d 2e 49 52 20 63 | 73 68 20 2e 0d 28 41 63 |in..IR c|sh ..(Ac|
|000041e0| 74 75 61 6c 6c 79 2c 20 | 69 74 27 73 20 6e 6f 74 |tually, |it's not|
|000041f0| 20 74 68 65 20 6c 65 6e | 67 74 68 20 6f 66 20 74 | the len|gth of t|
|00004200| 68 65 20 61 72 72 61 79 | 2c 20 69 74 27 73 20 74 |he array|, it's t|
|00004210| 68 65 20 73 75 62 73 63 | 72 69 70 74 20 6f 66 20 |he subsc|ript of |
|00004220| 74 68 65 20 6c 61 73 74 | 20 65 6c 65 6d 65 6e 74 |the last| element|
|00004230| 2c 20 73 69 6e 63 65 20 | 74 68 65 72 65 20 69 73 |, since |there is|
|00004240| 20 28 6f 72 64 69 6e 61 | 72 69 6c 79 29 20 61 20 | (ordina|rily) a |
|00004250| 30 74 68 20 65 6c 65 6d | 65 6e 74 2e 29 0d 41 73 |0th elem|ent.).As|
|00004260| 73 69 67 6e 69 6e 67 20 | 74 6f 20 24 23 64 61 79 |signing |to $#day|
|00004270| 73 20 63 68 61 6e 67 65 | 73 20 74 68 65 20 6c 65 |s change|s the le|
|00004280| 6e 67 74 68 20 6f 66 20 | 74 68 65 20 61 72 72 61 |ngth of |the arra|
|00004290| 79 2e 0d 53 68 6f 72 74 | 65 6e 69 6e 67 20 61 6e |y..Short|ening an|
|000042a0| 20 61 72 72 61 79 20 62 | 79 20 74 68 69 73 20 6d | array b|y this m|
|000042b0| 65 74 68 6f 64 20 64 6f | 65 73 20 6e 6f 74 20 61 |ethod do|es not a|
|000042c0| 63 74 75 61 6c 6c 79 20 | 64 65 73 74 72 6f 79 20 |ctually |destroy |
|000042d0| 61 6e 79 20 76 61 6c 75 | 65 73 2e 0d 4c 65 6e 67 |any valu|es..Leng|
|000042e0| 74 68 65 6e 69 6e 67 20 | 61 6e 20 61 72 72 61 79 |thening |an array|
|000042f0| 20 74 68 61 74 20 77 61 | 73 20 70 72 65 76 69 6f | that wa|s previo|
|00004300| 75 73 6c 79 20 73 68 6f | 72 74 65 6e 65 64 20 72 |usly sho|rtened r|
|00004310| 65 63 6f 76 65 72 73 20 | 74 68 65 20 76 61 6c 75 |ecovers |the valu|
|00004320| 65 73 20 74 68 61 74 0d | 77 65 72 65 20 69 6e 20 |es that.|were in |
|00004330| 74 68 6f 73 65 20 65 6c | 65 6d 65 6e 74 73 2e 0d |those el|ements..|
|00004340| 59 6f 75 20 63 61 6e 20 | 61 6c 73 6f 20 67 61 69 |You can |also gai|
|00004350| 6e 20 73 6f 6d 65 20 6d | 65 61 73 75 72 65 20 6f |n some m|easure o|
|00004360| 66 20 65 66 66 69 63 69 | 65 6e 63 79 20 62 79 20 |f effici|ency by |
|00004370| 70 72 65 65 78 74 65 6e | 64 69 6e 67 20 61 6e 20 |preexten|ding an |
|00004380| 61 72 72 61 79 20 74 68 | 61 74 0d 69 73 20 67 6f |array th|at.is go|
|00004390| 69 6e 67 20 74 6f 20 67 | 65 74 20 62 69 67 2e 0d |ing to g|et big..|
|000043a0| 28 59 6f 75 20 63 61 6e | 20 61 6c 73 6f 20 65 78 |(You can| also ex|
|000043b0| 74 65 6e 64 20 61 6e 20 | 61 72 72 61 79 20 62 79 |tend an |array by|
|000043c0| 20 61 73 73 69 67 6e 69 | 6e 67 20 74 6f 20 61 6e | assigni|ng to an|
|000043d0| 20 65 6c 65 6d 65 6e 74 | 20 74 68 61 74 20 69 73 | element| that is|
|000043e0| 20 6f 66 66 20 74 68 65 | 0d 65 6e 64 20 6f 66 20 | off the|.end of |
|000043f0| 74 68 65 20 61 72 72 61 | 79 2e 0d 54 68 69 73 20 |the arra|y..This |
|00004400| 64 69 66 66 65 72 73 20 | 66 72 6f 6d 20 61 73 73 |differs |from ass|
|00004410| 69 67 6e 69 6e 67 20 74 | 6f 20 24 23 77 68 61 74 |igning t|o $#what|
|00004420| 65 76 65 72 20 69 6e 20 | 74 68 61 74 20 69 6e 74 |ever in |that int|
|00004430| 65 72 76 65 6e 69 6e 67 | 20 76 61 6c 75 65 73 0d |ervening| values.|
|00004440| 61 72 65 20 73 65 74 20 | 74 6f 20 6e 75 6c 6c 20 |are set |to null |
|00004450| 72 61 74 68 65 72 20 74 | 68 61 6e 20 72 65 63 6f |rather t|han reco|
|00004460| 76 65 72 65 64 2e 29 0d | 59 6f 75 20 63 61 6e 20 |vered.).|You can |
|00004470| 74 72 75 6e 63 61 74 65 | 20 61 6e 20 61 72 72 61 |truncate| an arra|
|00004480| 79 20 64 6f 77 6e 20 74 | 6f 20 6e 6f 74 68 69 6e |y down t|o nothin|
|00004490| 67 20 62 79 20 61 73 73 | 69 67 6e 69 6e 67 20 74 |g by ass|igning t|
|000044a0| 68 65 20 6e 75 6c 6c 20 | 6c 69 73 74 20 28 29 20 |he null |list () |
|000044b0| 74 6f 0d 69 74 2e 0d 54 | 68 65 20 66 6f 6c 6c 6f |to.it..T|he follo|
|000044c0| 77 69 6e 67 20 61 72 65 | 20 65 78 61 63 74 6c 79 |wing are| exactly|
|000044d0| 20 65 71 75 69 76 61 6c | 65 6e 74 0d 2e 6e 66 0d | equival|ent..nf.|
|000044e0| 0d 09 40 77 68 61 74 65 | 76 65 72 20 3d 20 28 29 |..@whate|ver = ()|
|000044f0| 3b 0d 09 24 23 77 68 61 | 74 65 76 65 72 20 3d 20 |;..$#wha|tever = |
|00004500| 24 5b 20 5c 2d 20 31 3b | 0d 0d 2e 66 69 0d 2e 50 |$[ \- 1;|...fi..P|
|00004510| 50 0d 49 66 20 79 6f 75 | 20 65 76 61 6c 75 61 74 |P.If you| evaluat|
|00004520| 65 20 61 6e 20 61 72 72 | 61 79 20 69 6e 20 61 20 |e an arr|ay in a |
|00004530| 73 63 61 6c 61 72 20 63 | 6f 6e 74 65 78 74 2c 20 |scalar c|ontext, |
|00004540| 69 74 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 6c |it retur|ns the l|
|00004550| 65 6e 67 74 68 20 6f 66 | 0d 74 68 65 20 61 72 72 |ength of|.the arr|
|00004560| 61 79 2e 0d 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ay..The |followin|
|00004570| 67 20 69 73 20 61 6c 77 | 61 79 73 20 74 72 75 65 |g is alw|ays true|
|00004580| 3a 0d 2e 6e 66 0d 0d 09 | 73 63 61 6c 61 72 28 40 |:..nf...|scalar(@|
|00004590| 77 68 61 74 65 76 65 72 | 29 20 3d 3d 20 24 23 77 |whatever|) == $#w|
|000045a0| 68 61 74 65 76 65 72 20 | 5c 2d 20 24 5b 20 2b 20 |hatever |\- $[ + |
|000045b0| 31 3b 0d 0d 2e 66 69 0d | 49 66 20 79 6f 75 20 65 |1;...fi.|If you e|
|000045c0| 76 61 6c 75 61 74 65 20 | 61 6e 20 61 73 73 6f 63 |valuate |an assoc|
|000045d0| 69 61 74 69 76 65 20 61 | 72 72 61 79 20 69 6e 20 |iative a|rray in |
|000045e0| 61 20 73 63 61 6c 61 72 | 20 63 6f 6e 74 65 78 74 |a scalar| context|
|000045f0| 2c 20 69 74 20 72 65 74 | 75 72 6e 73 0d 61 20 76 |, it ret|urns.a v|
|00004600| 61 6c 75 65 20 77 68 69 | 63 68 20 69 73 20 74 72 |alue whi|ch is tr|
|00004610| 75 65 20 69 66 20 61 6e | 64 20 6f 6e 6c 79 20 69 |ue if an|d only i|
|00004620| 66 20 74 68 65 20 61 72 | 72 61 79 20 63 6f 6e 74 |f the ar|ray cont|
|00004630| 61 69 6e 73 20 61 6e 79 | 20 65 6c 65 6d 65 6e 74 |ains any| element|
|00004640| 73 2e 0d 28 49 66 20 74 | 68 65 72 65 20 61 72 65 |s..(If t|here are|
|00004650| 20 61 6e 79 20 65 6c 65 | 6d 65 6e 74 73 2c 20 74 | any ele|ments, t|
|00004660| 68 65 20 76 61 6c 75 65 | 20 72 65 74 75 72 6e 65 |he value| returne|
|00004670| 64 20 69 73 20 61 20 73 | 74 72 69 6e 67 20 63 6f |d is a s|tring co|
|00004680| 6e 73 69 73 74 69 6e 67 | 0d 6f 66 20 74 68 65 20 |nsisting|.of the |
|00004690| 6e 75 6d 62 65 72 20 6f | 66 20 75 73 65 64 20 62 |number o|f used b|
|000046a0| 75 63 6b 65 74 73 20 61 | 6e 64 20 74 68 65 20 6e |uckets a|nd the n|
|000046b0| 75 6d 62 65 72 20 6f 66 | 20 61 6c 6c 6f 63 61 74 |umber of| allocat|
|000046c0| 65 64 20 62 75 63 6b 65 | 74 73 2c 20 73 65 70 61 |ed bucke|ts, sepa|
|000046d0| 72 61 74 65 64 0d 62 79 | 20 61 20 73 6c 61 73 68 |rated.by| a slash|
|000046e0| 2e 29 0d 2e 50 50 0d 4d | 75 6c 74 69 2d 64 69 6d |.)..PP.M|ulti-dim|
|000046f0| 65 6e 73 69 6f 6e 61 6c | 20 61 72 72 61 79 73 20 |ensional| arrays |
|00004700| 61 72 65 20 6e 6f 74 20 | 64 69 72 65 63 74 6c 79 |are not |directly|
|00004710| 20 73 75 70 70 6f 72 74 | 65 64 2c 20 62 75 74 20 | support|ed, but |
|00004720| 73 65 65 20 74 68 65 20 | 64 69 73 63 75 73 73 69 |see the |discussi|
|00004730| 6f 6e 0d 6f 66 20 74 68 | 65 20 24 3b 20 76 61 72 |on.of th|e $; var|
|00004740| 69 61 62 6c 65 20 6c 61 | 74 65 72 20 66 6f 72 20 |iable la|ter for |
|00004750| 61 20 6d 65 61 6e 73 20 | 6f 66 20 65 6d 75 6c 61 |a means |of emula|
|00004760| 74 69 6e 67 20 6d 75 6c | 74 69 70 6c 65 20 73 75 |ting mul|tiple su|
|00004770| 62 73 63 72 69 70 74 73 | 20 77 69 74 68 0d 61 6e |bscripts| with.an|
|00004780| 20 61 73 73 6f 63 69 61 | 74 69 76 65 20 61 72 72 | associa|tive arr|
|00004790| 61 79 2e 0d 59 6f 75 20 | 63 6f 75 6c 64 20 61 6c |ay..You |could al|
|000047a0| 73 6f 20 77 72 69 74 65 | 20 61 20 73 75 62 72 6f |so write| a subro|
|000047b0| 75 74 69 6e 65 20 74 6f | 20 74 75 72 6e 20 6d 75 |utine to| turn mu|
|000047c0| 6c 74 69 70 6c 65 20 73 | 75 62 73 63 72 69 70 74 |ltiple s|ubscript|
|000047d0| 73 20 69 6e 74 6f 20 61 | 20 73 69 6e 67 6c 65 0d |s into a| single.|
|000047e0| 73 75 62 73 63 72 69 70 | 74 2e 0d 2e 50 50 0d 45 |subscrip|t...PP.E|
|000047f0| 76 65 72 79 20 64 61 74 | 61 20 74 79 70 65 20 68 |very dat|a type h|
|00004800| 61 73 20 69 74 73 20 6f | 77 6e 20 6e 61 6d 65 73 |as its o|wn names|
|00004810| 70 61 63 65 2e 0d 59 6f | 75 20 63 61 6e 2c 20 77 |pace..Yo|u can, w|
|00004820| 69 74 68 6f 75 74 20 66 | 65 61 72 20 6f 66 20 63 |ithout f|ear of c|
|00004830| 6f 6e 66 6c 69 63 74 2c | 20 75 73 65 20 74 68 65 |onflict,| use the|
|00004840| 20 73 61 6d 65 20 6e 61 | 6d 65 20 66 6f 72 20 61 | same na|me for a|
|00004850| 20 73 63 61 6c 61 72 20 | 76 61 72 69 61 62 6c 65 | scalar |variable|
|00004860| 2c 0d 61 6e 20 61 72 72 | 61 79 2c 20 61 6e 20 61 |,.an arr|ay, an a|
|00004870| 73 73 6f 63 69 61 74 69 | 76 65 20 61 72 72 61 79 |ssociati|ve array|
|00004880| 2c 20 61 20 66 69 6c 65 | 68 61 6e 64 6c 65 2c 20 |, a file|handle, |
|00004890| 61 20 73 75 62 72 6f 75 | 74 69 6e 65 20 6e 61 6d |a subrou|tine nam|
|000048a0| 65 2c 20 61 6e 64 2f 6f | 72 0d 61 20 6c 61 62 65 |e, and/o|r.a labe|
|000048b0| 6c 2e 0d 53 69 6e 63 65 | 20 76 61 72 69 61 62 6c |l..Since| variabl|
|000048c0| 65 20 61 6e 64 20 61 72 | 72 61 79 20 72 65 66 65 |e and ar|ray refe|
|000048d0| 72 65 6e 63 65 73 20 61 | 6c 77 61 79 73 20 73 74 |rences a|lways st|
|000048e0| 61 72 74 20 77 69 74 68 | 20 5c 2a 28 4c 27 24 5c |art with| \*(L'$\|
|000048f0| 2a 28 52 27 2c 20 5c 2a | 28 4c 27 40 5c 2a 28 52 |*(R', \*|(L'@\*(R|
|00004900| 27 2c 0d 6f 72 20 5c 2a | 28 4c 27 25 5c 2a 28 52 |',.or \*|(L'%\*(R|
|00004910| 27 2c 20 74 68 65 20 5c | 2a 28 4c 22 72 65 73 65 |', the \|*(L"rese|
|00004920| 72 76 65 64 5c 2a 28 52 | 22 20 77 6f 72 64 73 20 |rved\*(R|" words |
|00004930| 61 72 65 6e 27 74 20 69 | 6e 20 66 61 63 74 20 72 |aren't i|n fact r|
|00004940| 65 73 65 72 76 65 64 0d | 77 69 74 68 20 72 65 73 |eserved.|with res|
|00004950| 70 65 63 74 20 74 6f 20 | 76 61 72 69 61 62 6c 65 |pect to |variable|
|00004960| 20 6e 61 6d 65 73 2e 0d | 28 54 68 65 79 20 41 52 | names..|(They AR|
|00004970| 45 20 72 65 73 65 72 76 | 65 64 20 77 69 74 68 20 |E reserv|ed with |
|00004980| 72 65 73 70 65 63 74 20 | 74 6f 20 6c 61 62 65 6c |respect |to label|
|00004990| 73 20 61 6e 64 20 66 69 | 6c 65 68 61 6e 64 6c 65 |s and fi|lehandle|
|000049a0| 73 2c 20 68 6f 77 65 76 | 65 72 2c 20 77 68 69 63 |s, howev|er, whic|
|000049b0| 68 0d 64 6f 6e 27 74 20 | 68 61 76 65 20 61 6e 20 |h.don't |have an |
|000049c0| 69 6e 69 74 69 61 6c 20 | 73 70 65 63 69 61 6c 20 |initial |special |
|000049d0| 63 68 61 72 61 63 74 65 | 72 2e 0d 48 69 6e 74 3a |characte|r..Hint:|
|000049e0| 20 79 6f 75 20 63 6f 75 | 6c 64 20 73 61 79 20 6f | you cou|ld say o|
|000049f0| 70 65 6e 28 4c 4f 47 2c | 5c 27 6c 6f 67 66 69 6c |pen(LOG,|\'logfil|
|00004a00| 65 5c 27 29 20 72 61 74 | 68 65 72 20 74 68 61 6e |e\') rat|her than|
|00004a10| 20 6f 70 65 6e 28 6c 6f | 67 2c 5c 27 6c 6f 67 66 | open(lo|g,\'logf|
|00004a20| 69 6c 65 5c 27 29 2e 0d | 55 73 69 6e 67 20 75 70 |ile\')..|Using up|
|00004a30| 70 65 72 63 61 73 65 20 | 66 69 6c 65 68 61 6e 64 |percase |filehand|
|00004a40| 6c 65 73 20 61 6c 73 6f | 20 69 6d 70 72 6f 76 65 |les also| improve|
|00004a50| 73 20 72 65 61 64 61 62 | 69 6c 69 74 79 20 61 6e |s readab|ility an|
|00004a60| 64 20 70 72 6f 74 65 63 | 74 73 20 79 6f 75 0d 66 |d protec|ts you.f|
|00004a70| 72 6f 6d 20 63 6f 6e 66 | 6c 69 63 74 20 77 69 74 |rom conf|lict wit|
|00004a80| 68 20 66 75 74 75 72 65 | 20 72 65 73 65 72 76 65 |h future| reserve|
|00004a90| 64 20 77 6f 72 64 73 2e | 29 0d 43 61 73 65 20 49 |d words.|).Case I|
|00004aa0| 53 20 73 69 67 6e 69 66 | 69 63 61 6e 74 5c 2a 28 |S signif|icant\*(|
|00004ab0| 2d 2d 5c 2a 28 4c 22 46 | 4f 4f 5c 2a 28 52 22 2c |--\*(L"F|OO\*(R",|
|00004ac0| 20 5c 2a 28 4c 22 46 6f | 6f 5c 2a 28 52 22 20 61 | \*(L"Fo|o\*(R" a|
|00004ad0| 6e 64 20 5c 2a 28 4c 22 | 66 6f 6f 5c 2a 28 52 22 |nd \*(L"|foo\*(R"|
|00004ae0| 20 61 72 65 20 61 6c 6c | 0d 64 69 66 66 65 72 65 | are all|.differe|
|00004af0| 6e 74 20 6e 61 6d 65 73 | 2e 0d 4e 61 6d 65 73 20 |nt names|..Names |
|00004b00| 77 68 69 63 68 20 73 74 | 61 72 74 20 77 69 74 68 |which st|art with|
|00004b10| 20 61 20 6c 65 74 74 65 | 72 20 6d 61 79 20 61 6c | a lette|r may al|
|00004b20| 73 6f 20 63 6f 6e 74 61 | 69 6e 20 64 69 67 69 74 |so conta|in digit|
|00004b30| 73 20 61 6e 64 20 75 6e | 64 65 72 73 63 6f 72 65 |s and un|derscore|
|00004b40| 73 2e 0d 4e 61 6d 65 73 | 20 77 68 69 63 68 20 64 |s..Names| which d|
|00004b50| 6f 20 6e 6f 74 20 73 74 | 61 72 74 20 77 69 74 68 |o not st|art with|
|00004b60| 20 61 20 6c 65 74 74 65 | 72 20 61 72 65 20 6c 69 | a lette|r are li|
|00004b70| 6d 69 74 65 64 20 74 6f | 20 6f 6e 65 20 63 68 61 |mited to| one cha|
|00004b80| 72 61 63 74 65 72 2c 0d | 65 2e 67 2e 20 5c 2a 28 |racter,.|e.g. \*(|
|00004b90| 4c 22 24 25 5c 2a 28 52 | 22 20 6f 72 20 5c 2a 28 |L"$%\*(R|" or \*(|
|00004ba0| 4c 22 24 24 5c 2a 28 52 | 22 2e 0d 28 4d 6f 73 74 |L"$$\*(R|"..(Most|
|00004bb0| 20 6f 66 20 74 68 65 20 | 6f 6e 65 20 63 68 61 72 | of the |one char|
|00004bc0| 61 63 74 65 72 20 6e 61 | 6d 65 73 20 68 61 76 65 |acter na|mes have|
|00004bd0| 20 61 20 70 72 65 64 65 | 66 69 6e 65 64 20 73 69 | a prede|fined si|
|00004be0| 67 6e 69 66 69 63 61 6e | 63 65 20 74 6f 0d 2e 49 |gnifican|ce to..I|
|00004bf0| 52 20 70 65 72 6c 20 2e | 0d 4d 6f 72 65 20 6c 61 |R perl .|.More la|
|00004c00| 74 65 72 2e 29 0d 2e 50 | 50 0d 4e 75 6d 65 72 69 |ter.)..P|P.Numeri|
|00004c10| 63 20 6c 69 74 65 72 61 | 6c 73 20 61 72 65 20 73 |c litera|ls are s|
|00004c20| 70 65 63 69 66 69 65 64 | 20 69 6e 20 61 6e 79 20 |pecified| in any |
|00004c30| 6f 66 20 74 68 65 20 75 | 73 75 61 6c 20 66 6c 6f |of the u|sual flo|
|00004c40| 61 74 69 6e 67 20 70 6f | 69 6e 74 20 6f 72 0d 69 |ating po|int or.i|
|00004c50| 6e 74 65 67 65 72 20 66 | 6f 72 6d 61 74 73 3a 0d |nteger f|ormats:.|
|00004c60| 2e 6e 66 0d 0d 2e 6e 65 | 20 36 0d 20 20 20 20 31 |.nf...ne| 6. 1|
|00004c70| 32 33 34 35 0d 20 20 20 | 20 31 32 33 34 35 2e 36 |2345. | 12345.6|
|00004c80| 37 0d 20 20 20 20 2e 32 | 33 45 2d 31 30 0d 20 20 |7. .2|3E-10. |
|00004c90| 20 20 30 78 66 66 66 66 | 09 23 20 68 65 78 0d 20 | 0xffff|.# hex. |
|00004ca0| 20 20 20 30 33 37 37 09 | 23 20 6f 63 74 61 6c 0d | 0377.|# octal.|
|00004cb0| 20 20 20 20 34 5f 32 39 | 34 5f 39 36 37 5f 32 39 | 4_29|4_967_29|
|00004cc0| 36 0d 0d 2e 66 69 0d 53 | 74 72 69 6e 67 20 6c 69 |6...fi.S|tring li|
|00004cd0| 74 65 72 61 6c 73 20 61 | 72 65 20 64 65 6c 69 6d |terals a|re delim|
|00004ce0| 69 74 65 64 20 62 79 20 | 65 69 74 68 65 72 20 73 |ited by |either s|
|00004cf0| 69 6e 67 6c 65 20 6f 72 | 20 64 6f 75 62 6c 65 20 |ingle or| double |
|00004d00| 71 75 6f 74 65 73 2e 0d | 54 68 65 79 20 77 6f 72 |quotes..|They wor|
|00004d10| 6b 20 6d 75 63 68 20 6c | 69 6b 65 20 73 68 65 6c |k much l|ike shel|
|00004d20| 6c 20 71 75 6f 74 65 73 | 3a 0d 64 6f 75 62 6c 65 |l quotes|:.double|
|00004d30| 2d 71 75 6f 74 65 64 20 | 73 74 72 69 6e 67 20 6c |-quoted |string l|
|00004d40| 69 74 65 72 61 6c 73 20 | 61 72 65 20 73 75 62 6a |iterals |are subj|
|00004d50| 65 63 74 20 74 6f 20 62 | 61 63 6b 73 6c 61 73 68 |ect to b|ackslash|
|00004d60| 20 61 6e 64 20 76 61 72 | 69 61 62 6c 65 0d 73 75 | and var|iable.su|
|00004d70| 62 73 74 69 74 75 74 69 | 6f 6e 3b 20 73 69 6e 67 |bstituti|on; sing|
|00004d80| 6c 65 2d 71 75 6f 74 65 | 64 20 73 74 72 69 6e 67 |le-quote|d string|
|00004d90| 73 20 61 72 65 20 6e 6f | 74 20 28 65 78 63 65 70 |s are no|t (excep|
|00004da0| 74 20 66 6f 72 20 5c 65 | 5c 27 20 61 6e 64 20 5c |t for \e|\' and \|
|00004db0| 65 5c 65 29 2e 0d 54 68 | 65 20 75 73 75 61 6c 20 |e\e)..Th|e usual |
|00004dc0| 62 61 63 6b 73 6c 61 73 | 68 20 72 75 6c 65 73 20 |backslas|h rules |
|00004dd0| 61 70 70 6c 79 20 66 6f | 72 20 6d 61 6b 69 6e 67 |apply fo|r making|
|00004de0| 20 63 68 61 72 61 63 74 | 65 72 73 20 73 75 63 68 | charact|ers such|
|00004df0| 20 61 73 20 6e 65 77 6c | 69 6e 65 2c 20 74 61 62 | as newl|ine, tab|
|00004e00| 2c 0d 65 74 63 2e 2c 20 | 61 73 20 77 65 6c 6c 20 |,.etc., |as well |
|00004e10| 61 73 20 73 6f 6d 65 20 | 6d 6f 72 65 20 65 78 6f |as some |more exo|
|00004e20| 74 69 63 20 66 6f 72 6d | 73 3a 0d 2e 6e 66 0d 0d |tic form|s:..nf..|
|00004e30| 09 5c 65 74 09 09 74 61 | 62 0d 09 5c 65 6e 09 09 |.\et..ta|b..\en..|
|00004e40| 6e 65 77 6c 69 6e 65 0d | 09 5c 65 72 09 09 72 65 |newline.|.\er..re|
|00004e50| 74 75 72 6e 0d 09 5c 65 | 66 09 09 66 6f 72 6d 20 |turn..\e|f..form |
|00004e60| 66 65 65 64 0d 09 5c 65 | 62 09 09 62 61 63 6b 73 |feed..\e|b..backs|
|00004e70| 70 61 63 65 0d 09 5c 65 | 61 09 09 61 6c 61 72 6d |pace..\e|a..alarm|
|00004e80| 20 28 62 65 6c 6c 29 0d | 09 5c 65 65 09 09 65 73 | (bell).|.\ee..es|
|00004e90| 63 61 70 65 0d 09 5c 65 | 30 33 33 09 09 6f 63 74 |cape..\e|033..oct|
|00004ea0| 61 6c 20 63 68 61 72 0d | 09 5c 65 78 31 62 09 09 |al char.|.\ex1b..|
|00004eb0| 68 65 78 20 63 68 61 72 | 0d 09 5c 65 63 5b 09 09 |hex char|..\ec[..|
|00004ec0| 63 6f 6e 74 72 6f 6c 20 | 63 68 61 72 0d 09 5c 65 |control |char..\e|
|00004ed0| 6c 09 09 6c 6f 77 65 72 | 63 61 73 65 20 6e 65 78 |l..lower|case nex|
|00004ee0| 74 20 63 68 61 72 0d 09 | 5c 65 75 09 09 75 70 70 |t char..|\eu..upp|
|00004ef0| 65 72 63 61 73 65 20 6e | 65 78 74 20 63 68 61 72 |ercase n|ext char|
|00004f00| 0d 09 5c 65 4c 09 09 6c | 6f 77 65 72 63 61 73 65 |..\eL..l|owercase|
|00004f10| 20 74 69 6c 6c 20 5c 65 | 45 0d 09 5c 65 55 09 09 | till \e|E..\eU..|
|00004f20| 75 70 70 65 72 63 61 73 | 65 20 74 69 6c 6c 20 5c |uppercas|e till \|
|00004f30| 65 45 0d 09 5c 65 45 09 | 09 65 6e 64 20 63 61 73 |eE..\eE.|.end cas|
|00004f40| 65 20 6d 6f 64 69 66 69 | 63 61 74 69 6f 6e 0d 0d |e modifi|cation..|
|00004f50| 2e 66 69 0d 59 6f 75 20 | 63 61 6e 20 61 6c 73 6f |.fi.You |can also|
|00004f60| 20 65 6d 62 65 64 20 6e | 65 77 6c 69 6e 65 73 20 | embed n|ewlines |
|00004f70| 64 69 72 65 63 74 6c 79 | 20 69 6e 20 79 6f 75 72 |directly| in your|
|00004f80| 20 73 74 72 69 6e 67 73 | 2c 20 69 2e 65 2e 20 74 | strings|, i.e. t|
|00004f90| 68 65 79 20 63 61 6e 20 | 65 6e 64 20 6f 6e 0d 61 |hey can |end on.a|
|00004fa0| 20 64 69 66 66 65 72 65 | 6e 74 20 6c 69 6e 65 20 | differe|nt line |
|00004fb0| 74 68 61 6e 20 74 68 65 | 79 20 62 65 67 69 6e 2e |than the|y begin.|
|00004fc0| 0d 54 68 69 73 20 69 73 | 20 6e 69 63 65 2c 20 62 |.This is| nice, b|
|00004fd0| 75 74 20 69 66 20 79 6f | 75 20 66 6f 72 67 65 74 |ut if yo|u forget|
|00004fe0| 20 79 6f 75 72 20 74 72 | 61 69 6c 69 6e 67 20 71 | your tr|ailing q|
|00004ff0| 75 6f 74 65 2c 20 74 68 | 65 20 65 72 72 6f 72 20 |uote, th|e error |
|00005000| 77 69 6c 6c 20 6e 6f 74 | 20 62 65 0d 72 65 70 6f |will not| be.repo|
|00005010| 72 74 65 64 20 75 6e 74 | 69 6c 0d 2e 49 20 70 65 |rted unt|il..I pe|
|00005020| 72 6c 0d 66 69 6e 64 73 | 20 61 6e 6f 74 68 65 72 |rl.finds| another|
|00005030| 20 6c 69 6e 65 20 63 6f | 6e 74 61 69 6e 69 6e 67 | line co|ntaining|
|00005040| 20 74 68 65 20 71 75 6f | 74 65 20 63 68 61 72 61 | the quo|te chara|
|00005050| 63 74 65 72 2c 20 77 68 | 69 63 68 0d 6d 61 79 20 |cter, wh|ich.may |
|00005060| 62 65 20 6d 75 63 68 20 | 66 75 72 74 68 65 72 20 |be much |further |
|00005070| 6f 6e 20 69 6e 20 74 68 | 65 20 73 63 72 69 70 74 |on in th|e script|
|00005080| 2e 0d 56 61 72 69 61 62 | 6c 65 20 73 75 62 73 74 |..Variab|le subst|
|00005090| 69 74 75 74 69 6f 6e 20 | 69 6e 73 69 64 65 20 73 |itution |inside s|
|000050a0| 74 72 69 6e 67 73 20 69 | 73 20 6c 69 6d 69 74 65 |trings i|s limite|
|000050b0| 64 20 74 6f 20 73 63 61 | 6c 61 72 20 76 61 72 69 |d to sca|lar vari|
|000050c0| 61 62 6c 65 73 2c 20 6e | 6f 72 6d 61 6c 0d 61 72 |ables, n|ormal.ar|
|000050d0| 72 61 79 20 76 61 6c 75 | 65 73 2c 20 61 6e 64 20 |ray valu|es, and |
|000050e0| 61 72 72 61 79 20 73 6c | 69 63 65 73 2e 0d 28 49 |array sl|ices..(I|
|000050f0| 6e 20 6f 74 68 65 72 20 | 77 6f 72 64 73 2c 20 69 |n other |words, i|
|00005100| 64 65 6e 74 69 66 69 65 | 72 73 20 62 65 67 69 6e |dentifie|rs begin|
|00005110| 6e 69 6e 67 20 77 69 74 | 68 20 24 20 6f 72 20 40 |ning wit|h $ or @|
|00005120| 2c 20 66 6f 6c 6c 6f 77 | 65 64 20 62 79 20 61 6e |, follow|ed by an|
|00005130| 20 6f 70 74 69 6f 6e 61 | 6c 0d 62 72 61 63 6b 65 | optiona|l.bracke|
|00005140| 74 65 64 20 65 78 70 72 | 65 73 73 69 6f 6e 20 61 |ted expr|ession a|
|00005150| 73 20 61 20 73 75 62 73 | 63 72 69 70 74 2e 29 0d |s a subs|cript.).|
|00005160| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |The foll|owing co|
|00005170| 64 65 20 73 65 67 6d 65 | 6e 74 20 70 72 69 6e 74 |de segme|nt print|
|00005180| 73 20 6f 75 74 20 5c 2a | 28 4c 22 54 68 65 20 70 |s out \*|(L"The p|
|00005190| 72 69 63 65 20 69 73 20 | 24 31 30 30 2e 5c 2a 28 |rice is |$100.\*(|
|000051a0| 52 22 0d 2e 6e 66 0d 0d | 2e 6e 65 20 32 0d 20 20 |R"..nf..|.ne 2. |
|000051b0| 20 20 24 50 72 69 63 65 | 20 3d 20 5c 27 24 31 30 | $Price| = \'$10|
|000051c0| 30 5c 27 3b 5c 68 27 7c | 33 2e 35 69 27 23 20 6e |0\';\h'||3.5i'# n|
|000051d0| 6f 74 20 69 6e 74 65 72 | 70 72 65 74 65 64 0d 20 |ot inter|preted. |
|000051e0| 20 20 20 70 72 69 6e 74 | 20 22 54 68 65 20 70 72 | print| "The pr|
|000051f0| 69 63 65 20 69 73 20 24 | 50 72 69 63 65 2e 5c 65 |ice is $|Price.\e|
|00005200| 5c 7c 6e 22 3b 5c 68 27 | 7c 33 2e 35 69 27 23 20 |\|n";\h'||3.5i'# |
|00005210| 69 6e 74 65 72 70 72 65 | 74 65 64 0d 0d 2e 66 69 |interpre|ted...fi|
|00005220| 0d 4e 6f 74 65 20 74 68 | 61 74 20 79 6f 75 20 63 |.Note th|at you c|
|00005230| 61 6e 20 70 75 74 20 63 | 75 72 6c 79 20 62 72 61 |an put c|urly bra|
|00005240| 63 6b 65 74 73 20 61 72 | 6f 75 6e 64 20 74 68 65 |ckets ar|ound the|
|00005250| 20 69 64 65 6e 74 69 66 | 69 65 72 20 74 6f 20 64 | identif|ier to d|
|00005260| 65 6c 69 6d 69 74 20 69 | 74 0d 66 72 6f 6d 20 66 |elimit i|t.from f|
|00005270| 6f 6c 6c 6f 77 69 6e 67 | 20 61 6c 70 68 61 6e 75 |ollowing| alphanu|
|00005280| 6d 65 72 69 63 73 2e 0d | 41 6c 73 6f 20 6e 6f 74 |merics..|Also not|
|00005290| 65 20 74 68 61 74 20 61 | 20 73 69 6e 67 6c 65 20 |e that a| single |
|000052a0| 71 75 6f 74 65 64 20 73 | 74 72 69 6e 67 20 6d 75 |quoted s|tring mu|
|000052b0| 73 74 20 62 65 20 73 65 | 70 61 72 61 74 65 64 20 |st be se|parated |
|000052c0| 66 72 6f 6d 20 61 20 70 | 72 65 63 65 64 69 6e 67 |from a p|receding|
|000052d0| 0d 77 6f 72 64 20 62 79 | 20 61 20 73 70 61 63 65 |.word by| a space|
|000052e0| 2c 20 73 69 6e 63 65 20 | 73 69 6e 67 6c 65 20 71 |, since |single q|
|000052f0| 75 6f 74 65 20 69 73 20 | 61 20 76 61 6c 69 64 20 |uote is |a valid |
|00005300| 63 68 61 72 61 63 74 65 | 72 20 69 6e 20 61 6e 20 |characte|r in an |
|00005310| 69 64 65 6e 74 69 66 69 | 65 72 0d 28 73 65 65 20 |identifi|er.(see |
|00005320| 50 61 63 6b 61 67 65 73 | 29 2e 0d 2e 50 50 0d 54 |Packages|)...PP.T|
|00005330| 77 6f 20 73 70 65 63 69 | 61 6c 20 6c 69 74 65 72 |wo speci|al liter|
|00005340| 61 6c 73 20 61 72 65 20 | 5f 5c 7c 5f 4c 49 4e 45 |als are |_\|_LINE|
|00005350| 5f 5c 7c 5f 20 61 6e 64 | 20 5f 5c 7c 5f 46 49 4c |_\|_ and| _\|_FIL|
|00005360| 45 5f 5c 7c 5f 2c 20 77 | 68 69 63 68 20 72 65 70 |E_\|_, w|hich rep|
|00005370| 72 65 73 65 6e 74 20 74 | 68 65 20 63 75 72 72 65 |resent t|he curre|
|00005380| 6e 74 0d 6c 69 6e 65 20 | 6e 75 6d 62 65 72 20 61 |nt.line |number a|
|00005390| 6e 64 20 66 69 6c 65 6e | 61 6d 65 20 61 74 20 74 |nd filen|ame at t|
|000053a0| 68 61 74 20 70 6f 69 6e | 74 20 69 6e 20 79 6f 75 |hat poin|t in you|
|000053b0| 72 20 70 72 6f 67 72 61 | 6d 2e 0d 54 68 65 79 20 |r progra|m..They |
|000053c0| 6d 61 79 20 6f 6e 6c 79 | 20 62 65 20 75 73 65 64 |may only| be used|
|000053d0| 20 61 73 20 73 65 70 61 | 72 61 74 65 20 74 6f 6b | as sepa|rate tok|
|000053e0| 65 6e 73 3b 20 74 68 65 | 79 20 77 69 6c 6c 20 6e |ens; the|y will n|
|000053f0| 6f 74 20 62 65 20 69 6e | 74 65 72 70 6f 6c 61 74 |ot be in|terpolat|
|00005400| 65 64 0d 69 6e 74 6f 20 | 73 74 72 69 6e 67 73 2e |ed.into |strings.|
|00005410| 0d 49 6e 20 61 64 64 69 | 74 69 6f 6e 2c 20 74 68 |.In addi|tion, th|
|00005420| 65 20 74 6f 6b 65 6e 20 | 5f 5c 7c 5f 45 4e 44 5f |e token |_\|_END_|
|00005430| 5c 7c 5f 20 6d 61 79 20 | 62 65 20 75 73 65 64 20 |\|_ may |be used |
|00005440| 74 6f 20 69 6e 64 69 63 | 61 74 65 20 74 68 65 20 |to indic|ate the |
|00005450| 6c 6f 67 69 63 61 6c 20 | 65 6e 64 20 6f 66 20 74 |logical |end of t|
|00005460| 68 65 0d 73 63 72 69 70 | 74 20 62 65 66 6f 72 65 |he.scrip|t before|
|00005470| 20 74 68 65 20 61 63 74 | 75 61 6c 20 65 6e 64 20 | the act|ual end |
|00005480| 6f 66 20 66 69 6c 65 2e | 0d 41 6e 79 20 66 6f 6c |of file.|.Any fol|
|00005490| 6c 6f 77 69 6e 67 20 74 | 65 78 74 20 69 73 20 69 |lowing t|ext is i|
|000054a0| 67 6e 6f 72 65 64 2c 20 | 62 75 74 20 6d 61 79 20 |gnored, |but may |
|000054b0| 62 65 20 72 65 61 64 20 | 76 69 61 20 74 68 65 20 |be read |via the |
|000054c0| 44 41 54 41 20 66 69 6c | 65 68 61 6e 64 6c 65 2e |DATA fil|ehandle.|
|000054d0| 0d 28 54 68 65 20 44 41 | 54 41 20 66 69 6c 65 68 |.(The DA|TA fileh|
|000054e0| 61 6e 64 6c 65 20 6d 61 | 79 20 72 65 61 64 20 64 |andle ma|y read d|
|000054f0| 61 74 61 20 6f 6e 6c 79 | 20 66 72 6f 6d 20 74 68 |ata only| from th|
|00005500| 65 20 6d 61 69 6e 20 73 | 63 72 69 70 74 2c 20 62 |e main s|cript, b|
|00005510| 75 74 20 6e 6f 74 20 66 | 72 6f 6d 0d 61 6e 79 20 |ut not f|rom.any |
|00005520| 72 65 71 75 69 72 65 64 | 20 66 69 6c 65 20 6f 72 |required| file or|
|00005530| 20 65 76 61 6c 75 61 74 | 65 64 20 73 74 72 69 6e | evaluat|ed strin|
|00005540| 67 2e 29 0d 54 68 65 20 | 74 77 6f 20 63 6f 6e 74 |g.).The |two cont|
|00005550| 72 6f 6c 20 63 68 61 72 | 61 63 74 65 72 73 20 5e |rol char|acters ^|
|00005560| 44 20 61 6e 64 20 5e 5a | 20 61 72 65 20 73 79 6e |D and ^Z| are syn|
|00005570| 6f 6e 79 6d 73 20 66 6f | 72 20 5f 5c 7c 5f 45 4e |onyms fo|r _\|_EN|
|00005580| 44 5f 5c 7c 5f 2e 0d 2e | 50 50 0d 41 20 77 6f 72 |D_\|_...|PP.A wor|
|00005590| 64 20 74 68 61 74 20 64 | 6f 65 73 6e 27 74 20 68 |d that d|oesn't h|
|000055a0| 61 76 65 20 61 6e 79 20 | 6f 74 68 65 72 20 69 6e |ave any |other in|
|000055b0| 74 65 72 70 72 65 74 61 | 74 69 6f 6e 20 69 6e 20 |terpreta|tion in |
|000055c0| 74 68 65 20 67 72 61 6d | 6d 61 72 20 77 69 6c 6c |the gram|mar will|
|000055d0| 20 62 65 0d 74 72 65 61 | 74 65 64 20 61 73 20 69 | be.trea|ted as i|
|000055e0| 66 20 69 74 20 68 61 64 | 20 73 69 6e 67 6c 65 20 |f it had| single |
|000055f0| 71 75 6f 74 65 73 20 61 | 72 6f 75 6e 64 20 69 74 |quotes a|round it|
|00005600| 2e 0d 46 6f 72 20 74 68 | 69 73 20 70 75 72 70 6f |..For th|is purpo|
|00005610| 73 65 2c 20 61 20 77 6f | 72 64 20 63 6f 6e 73 69 |se, a wo|rd consi|
|00005620| 73 74 73 20 6f 6e 6c 79 | 20 6f 66 20 61 6c 70 68 |sts only| of alph|
|00005630| 61 6e 75 6d 65 72 69 63 | 20 63 68 61 72 61 63 74 |anumeric| charact|
|00005640| 65 72 73 20 61 6e 64 20 | 75 6e 64 65 72 6c 69 6e |ers and |underlin|
|00005650| 65 2c 0d 61 6e 64 20 6d | 75 73 74 20 73 74 61 72 |e,.and m|ust star|
|00005660| 74 20 77 69 74 68 20 61 | 6e 20 61 6c 70 68 61 62 |t with a|n alphab|
|00005670| 65 74 69 63 20 63 68 61 | 72 61 63 74 65 72 2e 0d |etic cha|racter..|
|00005680| 41 73 20 77 69 74 68 20 | 66 69 6c 65 68 61 6e 64 |As with |filehand|
|00005690| 6c 65 73 20 61 6e 64 20 | 6c 61 62 65 6c 73 2c 20 |les and |labels, |
|000056a0| 61 20 62 61 72 65 20 77 | 6f 72 64 20 74 68 61 74 |a bare w|ord that|
|000056b0| 20 63 6f 6e 73 69 73 74 | 73 20 65 6e 74 69 72 65 | consist|s entire|
|000056c0| 6c 79 20 6f 66 0d 6c 6f | 77 65 72 63 61 73 65 20 |ly of.lo|wercase |
|000056d0| 6c 65 74 74 65 72 73 20 | 72 69 73 6b 73 20 63 6f |letters |risks co|
|000056e0| 6e 66 6c 69 63 74 20 77 | 69 74 68 20 66 75 74 75 |nflict w|ith futu|
|000056f0| 72 65 20 72 65 73 65 72 | 76 65 64 20 77 6f 72 64 |re reser|ved word|
|00005700| 73 2c 20 61 6e 64 20 69 | 66 20 79 6f 75 0d 75 73 |s, and i|f you.us|
|00005710| 65 20 74 68 65 0d 2e 42 | 20 5c 2d 77 0d 73 77 69 |e the..B| \-w.swi|
|00005720| 74 63 68 2c 20 50 65 72 | 6c 20 77 69 6c 6c 20 77 |tch, Per|l will w|
|00005730| 61 72 6e 20 79 6f 75 20 | 61 62 6f 75 74 20 61 6e |arn you |about an|
|00005740| 79 20 73 75 63 68 20 77 | 6f 72 64 73 2e 0d 2e 50 |y such w|ords...P|
|00005750| 50 0d 41 72 72 61 79 20 | 76 61 6c 75 65 73 20 61 |P.Array |values a|
|00005760| 72 65 20 69 6e 74 65 72 | 70 6f 6c 61 74 65 64 20 |re inter|polated |
|00005770| 69 6e 74 6f 20 64 6f 75 | 62 6c 65 2d 71 75 6f 74 |into dou|ble-quot|
|00005780| 65 64 20 73 74 72 69 6e | 67 73 20 62 79 20 6a 6f |ed strin|gs by jo|
|00005790| 69 6e 69 6e 67 20 61 6c | 6c 20 74 68 65 0d 65 6c |ining al|l the.el|
|000057a0| 65 6d 65 6e 74 73 20 6f | 66 20 74 68 65 20 61 72 |ements o|f the ar|
|000057b0| 72 61 79 20 77 69 74 68 | 20 74 68 65 20 64 65 6c |ray with| the del|
|000057c0| 69 6d 69 74 65 72 20 73 | 70 65 63 69 66 69 65 64 |imiter s|pecified|
|000057d0| 20 69 6e 20 74 68 65 20 | 24 22 20 76 61 72 69 61 | in the |$" varia|
|000057e0| 62 6c 65 2c 0d 73 70 61 | 63 65 20 62 79 20 64 65 |ble,.spa|ce by de|
|000057f0| 66 61 75 6c 74 2e 0d 28 | 53 69 6e 63 65 20 69 6e |fault..(|Since in|
|00005800| 20 76 65 72 73 69 6f 6e | 73 20 6f 66 20 70 65 72 | version|s of per|
|00005810| 6c 20 70 72 69 6f 72 20 | 74 6f 20 33 2e 30 20 74 |l prior |to 3.0 t|
|00005820| 68 65 20 40 20 63 68 61 | 72 61 63 74 65 72 20 77 |he @ cha|racter w|
|00005830| 61 73 20 6e 6f 74 20 61 | 20 6d 65 74 61 63 68 61 |as not a| metacha|
|00005840| 72 61 63 74 65 72 0d 69 | 6e 20 64 6f 75 62 6c 65 |racter.i|n double|
|00005850| 2d 71 75 6f 74 65 64 20 | 73 74 72 69 6e 67 73 2c |-quoted |strings,|
|00005860| 20 74 68 65 20 69 6e 74 | 65 72 70 6f 6c 61 74 69 | the int|erpolati|
|00005870| 6f 6e 20 6f 66 20 40 61 | 72 72 61 79 2c 20 24 61 |on of @a|rray, $a|
|00005880| 72 72 61 79 5b 45 58 50 | 52 5d 2c 0d 40 61 72 72 |rray[EXP|R],.@arr|
|00005890| 61 79 5b 4c 49 53 54 5d | 2c 20 24 61 72 72 61 79 |ay[LIST]|, $array|
|000058a0| 7b 45 58 50 52 7d 2c 20 | 6f 72 20 40 61 72 72 61 |{EXPR}, |or @arra|
|000058b0| 79 7b 4c 49 53 54 7d 20 | 6f 6e 6c 79 20 68 61 70 |y{LIST} |only hap|
|000058c0| 70 65 6e 73 20 69 66 20 | 61 72 72 61 79 20 69 73 |pens if |array is|
|000058d0| 0d 72 65 66 65 72 65 6e | 63 65 64 20 65 6c 73 65 |.referen|ced else|
|000058e0| 77 68 65 72 65 20 69 6e | 20 74 68 65 20 70 72 6f |where in| the pro|
|000058f0| 67 72 61 6d 20 6f 72 20 | 69 73 20 70 72 65 64 65 |gram or |is prede|
|00005900| 66 69 6e 65 64 2e 29 0d | 54 68 65 20 66 6f 6c 6c |fined.).|The foll|
|00005910| 6f 77 69 6e 67 20 61 72 | 65 20 65 71 75 69 76 61 |owing ar|e equiva|
|00005920| 6c 65 6e 74 3a 0d 2e 6e | 66 0d 0d 2e 6e 65 20 34 |lent:..n|f...ne 4|
|00005930| 0d 09 24 74 65 6d 70 20 | 3d 20 6a 6f 69 6e 28 24 |..$temp |= join($|
|00005940| 22 2c 40 41 52 47 56 29 | 3b 0d 09 73 79 73 74 65 |",@ARGV)|;..syste|
|00005950| 6d 20 22 65 63 68 6f 20 | 24 74 65 6d 70 22 3b 0d |m "echo |$temp";.|
|00005960| 0d 09 73 79 73 74 65 6d | 20 22 65 63 68 6f 20 40 |..system| "echo @|
|00005970| 41 52 47 56 22 3b 0d 0d | 2e 66 69 0d 57 69 74 68 |ARGV";..|.fi.With|
|00005980| 69 6e 20 73 65 61 72 63 | 68 20 70 61 74 74 65 72 |in searc|h patter|
|00005990| 6e 73 20 28 77 68 69 63 | 68 20 61 6c 73 6f 20 75 |ns (whic|h also u|
|000059a0| 6e 64 65 72 67 6f 20 64 | 6f 75 62 6c 65 2d 71 75 |ndergo d|ouble-qu|
|000059b0| 6f 74 69 73 68 20 73 75 | 62 73 74 69 74 75 74 69 |otish su|bstituti|
|000059c0| 6f 6e 29 0d 74 68 65 72 | 65 20 69 73 20 61 20 62 |on).ther|e is a b|
|000059d0| 61 64 20 61 6d 62 69 67 | 75 69 74 79 3a 20 20 49 |ad ambig|uity: I|
|000059e0| 73 20 2f 24 66 6f 6f 5b | 62 61 72 5d 2f 20 74 6f |s /$foo[|bar]/ to|
|000059f0| 20 62 65 0d 69 6e 74 65 | 72 70 72 65 74 65 64 20 | be.inte|rpreted |
|00005a00| 61 73 20 2f 24 7b 66 6f | 6f 7d 5b 62 61 72 5d 2f |as /${fo|o}[bar]/|
|00005a10| 20 28 77 68 65 72 65 20 | 5b 62 61 72 5d 20 69 73 | (where |[bar] is|
|00005a20| 20 61 20 63 68 61 72 61 | 63 74 65 72 20 63 6c 61 | a chara|cter cla|
|00005a30| 73 73 20 66 6f 72 20 74 | 68 65 0d 72 65 67 75 6c |ss for t|he.regul|
|00005a40| 61 72 20 65 78 70 72 65 | 73 73 69 6f 6e 29 20 6f |ar expre|ssion) o|
|00005a50| 72 20 61 73 20 2f 24 7b | 66 6f 6f 5b 62 61 72 5d |r as /${|foo[bar]|
|00005a60| 7d 2f 20 28 77 68 65 72 | 65 20 5b 62 61 72 5d 20 |}/ (wher|e [bar] |
|00005a70| 69 73 20 74 68 65 20 73 | 75 62 73 63 72 69 70 74 |is the s|ubscript|
|00005a80| 20 74 6f 0d 61 72 72 61 | 79 20 40 66 6f 6f 29 3f | to.arra|y @foo)?|
|00005a90| 0d 49 66 20 40 66 6f 6f | 20 64 6f 65 73 6e 27 74 |.If @foo| doesn't|
|00005aa0| 20 6f 74 68 65 72 77 69 | 73 65 20 65 78 69 73 74 | otherwi|se exist|
|00005ab0| 2c 20 74 68 65 6e 20 69 | 74 27 73 20 6f 62 76 69 |, then i|t's obvi|
|00005ac0| 6f 75 73 6c 79 20 61 20 | 63 68 61 72 61 63 74 65 |ously a |characte|
|00005ad0| 72 20 63 6c 61 73 73 2e | 0d 49 66 20 40 66 6f 6f |r class.|.If @foo|
|00005ae0| 20 65 78 69 73 74 73 2c | 20 70 65 72 6c 20 74 61 | exists,| perl ta|
|00005af0| 6b 65 73 20 61 20 67 6f | 6f 64 20 67 75 65 73 73 |kes a go|od guess|
|00005b00| 20 61 62 6f 75 74 20 5b | 62 61 72 5d 2c 20 61 6e | about [|bar], an|
|00005b10| 64 20 69 73 20 61 6c 6d | 6f 73 74 20 61 6c 77 61 |d is alm|ost alwa|
|00005b20| 79 73 20 72 69 67 68 74 | 2e 0d 49 66 20 69 74 20 |ys right|..If it |
|00005b30| 64 6f 65 73 20 67 75 65 | 73 73 20 77 72 6f 6e 67 |does gue|ss wrong|
|00005b40| 2c 20 6f 72 20 69 66 20 | 79 6f 75 27 72 65 20 6a |, or if |you're j|
|00005b50| 75 73 74 20 70 6c 61 69 | 6e 20 70 61 72 61 6e 6f |ust plai|n parano|
|00005b60| 69 64 2c 0d 79 6f 75 20 | 63 61 6e 20 66 6f 72 63 |id,.you |can forc|
|00005b70| 65 20 74 68 65 20 63 6f | 72 72 65 63 74 20 69 6e |e the co|rrect in|
|00005b80| 74 65 72 70 72 65 74 61 | 74 69 6f 6e 20 77 69 74 |terpreta|tion wit|
|00005b90| 68 20 63 75 72 6c 79 20 | 62 72 61 63 6b 65 74 73 |h curly |brackets|
|00005ba0| 20 61 73 20 61 62 6f 76 | 65 2e 0d 2e 50 50 0d 41 | as abov|e...PP.A|
|00005bb0| 20 6c 69 6e 65 2d 6f 72 | 69 65 6e 74 65 64 20 66 | line-or|iented f|
|00005bc0| 6f 72 6d 20 6f 66 20 71 | 75 6f 74 69 6e 67 20 69 |orm of q|uoting i|
|00005bd0| 73 20 62 61 73 65 64 20 | 6f 6e 20 74 68 65 20 73 |s based |on the s|
|00005be0| 68 65 6c 6c 20 68 65 72 | 65 2d 69 73 20 73 79 6e |hell her|e-is syn|
|00005bf0| 74 61 78 2e 0d 46 6f 6c | 6c 6f 77 69 6e 67 20 61 |tax..Fol|lowing a|
|00005c00| 20 3c 3c 20 79 6f 75 20 | 73 70 65 63 69 66 79 20 | << you |specify |
|00005c10| 61 20 73 74 72 69 6e 67 | 20 74 6f 20 74 65 72 6d |a string| to term|
|00005c20| 69 6e 61 74 65 20 74 68 | 65 20 71 75 6f 74 65 64 |inate th|e quoted|
|00005c30| 20 6d 61 74 65 72 69 61 | 6c 2c 20 61 6e 64 20 61 | materia|l, and a|
|00005c40| 6c 6c 20 6c 69 6e 65 73 | 0d 66 6f 6c 6c 6f 77 69 |ll lines|.followi|
|00005c50| 6e 67 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 6c |ng the c|urrent l|
|00005c60| 69 6e 65 20 64 6f 77 6e | 20 74 6f 20 74 68 65 20 |ine down| to the |
|00005c70| 74 65 72 6d 69 6e 61 74 | 69 6e 67 20 73 74 72 69 |terminat|ing stri|
|00005c80| 6e 67 20 61 72 65 20 74 | 68 65 20 76 61 6c 75 65 |ng are t|he value|
|00005c90| 0d 6f 66 20 74 68 65 20 | 69 74 65 6d 2e 0d 54 68 |.of the |item..Th|
|00005ca0| 65 20 74 65 72 6d 69 6e | 61 74 69 6e 67 20 73 74 |e termin|ating st|
|00005cb0| 72 69 6e 67 20 6d 61 79 | 20 62 65 20 65 69 74 68 |ring may| be eith|
|00005cc0| 65 72 20 61 6e 20 69 64 | 65 6e 74 69 66 69 65 72 |er an id|entifier|
|00005cd0| 20 28 61 20 77 6f 72 64 | 29 2c 20 6f 72 20 73 6f | (a word|), or so|
|00005ce0| 6d 65 0d 71 75 6f 74 65 | 64 20 74 65 78 74 2e 0d |me.quote|d text..|
|00005cf0| 49 66 20 71 75 6f 74 65 | 64 2c 20 74 68 65 20 74 |If quote|d, the t|
|00005d00| 79 70 65 20 6f 66 20 71 | 75 6f 74 65 73 20 79 6f |ype of q|uotes yo|
|00005d10| 75 20 75 73 65 20 64 65 | 74 65 72 6d 69 6e 65 73 |u use de|termines|
|00005d20| 20 74 68 65 20 74 72 65 | 61 74 6d 65 6e 74 20 6f | the tre|atment o|
|00005d30| 66 20 74 68 65 20 74 65 | 78 74 2c 0d 6a 75 73 74 |f the te|xt,.just|
|00005d40| 20 61 73 20 69 6e 20 72 | 65 67 75 6c 61 72 20 71 | as in r|egular q|
|00005d50| 75 6f 74 69 6e 67 2e 0d | 41 6e 20 75 6e 71 75 6f |uoting..|An unquo|
|00005d60| 74 65 64 20 69 64 65 6e | 74 69 66 69 65 72 20 77 |ted iden|tifier w|
|00005d70| 6f 72 6b 73 20 6c 69 6b | 65 20 64 6f 75 62 6c 65 |orks lik|e double|
|00005d80| 20 71 75 6f 74 65 73 2e | 0d 54 68 65 72 65 20 6d | quotes.|.There m|
|00005d90| 75 73 74 20 62 65 20 6e | 6f 20 73 70 61 63 65 20 |ust be n|o space |
|00005da0| 62 65 74 77 65 65 6e 20 | 74 68 65 20 3c 3c 20 61 |between |the << a|
|00005db0| 6e 64 20 74 68 65 20 69 | 64 65 6e 74 69 66 69 65 |nd the i|dentifie|
|00005dc0| 72 2e 0d 28 49 66 20 79 | 6f 75 20 70 75 74 20 61 |r..(If y|ou put a|
|00005dd0| 20 73 70 61 63 65 20 69 | 74 20 77 69 6c 6c 20 62 | space i|t will b|
|00005de0| 65 20 74 72 65 61 74 65 | 64 20 61 73 20 61 20 6e |e treate|d as a n|
|00005df0| 75 6c 6c 20 69 64 65 6e | 74 69 66 69 65 72 2c 20 |ull iden|tifier, |
|00005e00| 77 68 69 63 68 20 69 73 | 0d 76 61 6c 69 64 2c 20 |which is|.valid, |
|00005e10| 61 6e 64 20 6d 61 74 63 | 68 65 73 20 74 68 65 20 |and matc|hes the |
|00005e20| 66 69 72 73 74 20 62 6c | 61 6e 6b 20 6c 69 6e 65 |first bl|ank line|
|00005e30| 5c 2a 28 2d 2d 73 65 65 | 20 4d 65 72 72 79 20 43 |\*(--see| Merry C|
|00005e40| 68 72 69 73 74 6d 61 73 | 20 65 78 61 6d 70 6c 65 |hristmas| example|
|00005e50| 20 62 65 6c 6f 77 2e 29 | 0d 54 68 65 20 74 65 72 | below.)|.The ter|
|00005e60| 6d 69 6e 61 74 69 6e 67 | 20 73 74 72 69 6e 67 20 |minating| string |
|00005e70| 6d 75 73 74 20 61 70 70 | 65 61 72 20 62 79 20 69 |must app|ear by i|
|00005e80| 74 73 65 6c 66 20 28 75 | 6e 71 75 6f 74 65 64 20 |tself (u|nquoted |
|00005e90| 61 6e 64 20 77 69 74 68 | 20 6e 6f 20 73 75 72 72 |and with| no surr|
|00005ea0| 6f 75 6e 64 69 6e 67 0d | 77 68 69 74 65 73 70 61 |ounding.|whitespa|
|00005eb0| 63 65 29 20 6f 6e 20 74 | 68 65 20 74 65 72 6d 69 |ce) on t|he termi|
|00005ec0| 6e 61 74 69 6e 67 20 6c | 69 6e 65 2e 0d 2e 6e 66 |nating l|ine...nf|
|00005ed0| 0d 0d 09 70 72 69 6e 74 | 20 3c 3c 45 4f 46 3b 09 |...print| <<EOF;.|
|00005ee0| 09 23 20 73 61 6d 65 20 | 61 73 20 61 62 6f 76 65 |.# same |as above|
|00005ef0| 0d 54 68 65 20 70 72 69 | 63 65 20 69 73 20 24 50 |.The pri|ce is $P|
|00005f00| 72 69 63 65 2e 0d 45 4f | 46 0d 0d 09 70 72 69 6e |rice..EO|F...prin|
|00005f10| 74 20 3c 3c 22 45 4f 46 | 22 3b 09 09 23 20 73 61 |t <<"EOF|";..# sa|
|00005f20| 6d 65 20 61 73 20 61 62 | 6f 76 65 0d 54 68 65 20 |me as ab|ove.The |
|00005f30| 70 72 69 63 65 20 69 73 | 20 24 50 72 69 63 65 2e |price is| $Price.|
|00005f40| 0d 45 4f 46 0d 0d 09 70 | 72 69 6e 74 20 3c 3c 20 |.EOF...p|rint << |
|00005f50| 78 20 31 30 3b 09 09 23 | 20 6e 75 6c 6c 20 69 64 |x 10;..#| null id|
|00005f60| 65 6e 74 69 66 69 65 72 | 20 69 73 20 64 65 6c 69 |entifier| is deli|
|00005f70| 6d 69 74 65 72 0d 4d 65 | 72 72 79 20 43 68 72 69 |miter.Me|rry Chri|
|00005f80| 73 74 6d 61 73 21 0d 0d | 09 70 72 69 6e 74 20 3c |stmas!..|.print <|
|00005f90| 3c 60 45 4f 43 60 3b 09 | 09 23 20 65 78 65 63 75 |<`EOC`;.|.# execu|
|00005fa0| 74 65 20 63 6f 6d 6d 61 | 6e 64 73 0d 65 63 68 6f |te comma|nds.echo|
|00005fb0| 20 68 69 20 74 68 65 72 | 65 0d 65 63 68 6f 20 6c | hi ther|e.echo l|
|00005fc0| 6f 20 74 68 65 72 65 0d | 45 4f 43 0d 0d 09 70 72 |o there.|EOC...pr|
|00005fd0| 69 6e 74 20 3c 3c 66 6f | 6f 2c 20 3c 3c 62 61 72 |int <<fo|o, <<bar|
|00005fe0| 3b 09 23 20 79 6f 75 20 | 63 61 6e 20 73 74 61 63 |;.# you |can stac|
|00005ff0| 6b 20 74 68 65 6d 0d 49 | 20 73 61 69 64 20 66 6f |k them.I| said fo|
|00006000| 6f 2e 0d 66 6f 6f 0d 49 | 20 73 61 69 64 20 62 61 |o..foo.I| said ba|
|00006010| 72 2e 0d 62 61 72 0d 0d | 2e 66 69 0d 41 72 72 61 |r..bar..|.fi.Arra|
|00006020| 79 20 6c 69 74 65 72 61 | 6c 73 20 61 72 65 20 64 |y litera|ls are d|
|00006030| 65 6e 6f 74 65 64 20 62 | 79 20 73 65 70 61 72 61 |enoted b|y separa|
|00006040| 74 69 6e 67 20 69 6e 64 | 69 76 69 64 75 61 6c 20 |ting ind|ividual |
|00006050| 76 61 6c 75 65 73 20 62 | 79 20 63 6f 6d 6d 61 73 |values b|y commas|
|00006060| 2c 20 61 6e 64 0d 65 6e | 63 6c 6f 73 69 6e 67 20 |, and.en|closing |
|00006070| 74 68 65 20 6c 69 73 74 | 20 69 6e 20 70 61 72 65 |the list| in pare|
|00006080| 6e 74 68 65 73 65 73 3a | 0d 2e 6e 66 0d 0d 09 28 |ntheses:|..nf...(|
|00006090| 4c 49 53 54 29 0d 0d 2e | 66 69 0d 49 6e 20 61 20 |LIST)...|fi.In a |
|000060a0| 63 6f 6e 74 65 78 74 20 | 6e 6f 74 20 72 65 71 75 |context |not requ|
|000060b0| 69 72 69 6e 67 20 61 6e | 20 61 72 72 61 79 20 76 |iring an| array v|
|000060c0| 61 6c 75 65 2c 20 74 68 | 65 20 76 61 6c 75 65 20 |alue, th|e value |
|000060d0| 6f 66 20 74 68 65 20 61 | 72 72 61 79 20 6c 69 74 |of the a|rray lit|
|000060e0| 65 72 61 6c 0d 69 73 20 | 74 68 65 20 76 61 6c 75 |eral.is |the valu|
|000060f0| 65 20 6f 66 20 74 68 65 | 20 66 69 6e 61 6c 20 65 |e of the| final e|
|00006100| 6c 65 6d 65 6e 74 2c 20 | 61 73 20 69 6e 20 74 68 |lement, |as in th|
|00006110| 65 20 43 20 63 6f 6d 6d | 61 20 6f 70 65 72 61 74 |e C comm|a operat|
|00006120| 6f 72 2e 0d 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |or..For |example,|
|00006130| 0d 2e 6e 66 0d 0d 2e 6e | 65 20 34 0d 20 20 20 20 |..nf...n|e 4. |
|00006140| 40 66 6f 6f 20 3d 20 28 | 5c 27 63 63 5c 27 2c 20 |@foo = (|\'cc\', |
|00006150| 5c 27 5c 2d 45 5c 27 2c | 20 24 62 61 72 29 3b 0d |\'\-E\',| $bar);.|
|00006160| 0d 61 73 73 69 67 6e 73 | 20 74 68 65 20 65 6e 74 |.assigns| the ent|
|00006170| 69 72 65 20 61 72 72 61 | 79 20 76 61 6c 75 65 20 |ire arra|y value |
|00006180| 74 6f 20 61 72 72 61 79 | 20 66 6f 6f 2c 20 62 75 |to array| foo, bu|
|00006190| 74 0d 0d 20 20 20 20 24 | 66 6f 6f 20 3d 20 28 5c |t.. $|foo = (\|
|000061a0| 27 63 63 5c 27 2c 20 5c | 27 5c 2d 45 5c 27 2c 20 |'cc\', \|'\-E\', |
|000061b0| 24 62 61 72 29 3b 0d 0d | 2e 66 69 0d 61 73 73 69 |$bar);..|.fi.assi|
|000061c0| 67 6e 73 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |gns the |value of|
|000061d0| 20 76 61 72 69 61 62 6c | 65 20 62 61 72 20 74 6f | variabl|e bar to|
|000061e0| 20 76 61 72 69 61 62 6c | 65 20 66 6f 6f 2e 0d 4e | variabl|e foo..N|
|000061f0| 6f 74 65 20 74 68 61 74 | 20 74 68 65 20 76 61 6c |ote that| the val|
|00006200| 75 65 20 6f 66 20 61 6e | 20 61 63 74 75 61 6c 20 |ue of an| actual |
|00006210| 61 72 72 61 79 20 69 6e | 20 61 20 73 63 61 6c 61 |array in| a scala|
|00006220| 72 20 63 6f 6e 74 65 78 | 74 20 69 73 20 74 68 65 |r contex|t is the|
|00006230| 20 6c 65 6e 67 74 68 0d | 6f 66 20 74 68 65 20 61 | length.|of the a|
|00006240| 72 72 61 79 3b 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |rray; th|e follow|
|00006250| 69 6e 67 20 61 73 73 69 | 67 6e 73 20 74 6f 20 24 |ing assi|gns to $|
|00006260| 66 6f 6f 20 74 68 65 20 | 76 61 6c 75 65 20 33 3a |foo the |value 3:|
|00006270| 0d 2e 6e 66 0d 0d 2e 6e | 65 20 32 0d 20 20 20 20 |..nf...n|e 2. |
|00006280| 40 66 6f 6f 20 3d 20 28 | 5c 27 63 63 5c 27 2c 20 |@foo = (|\'cc\', |
|00006290| 5c 27 5c 2d 45 5c 27 2c | 20 24 62 61 72 29 3b 0d |\'\-E\',| $bar);.|
|000062a0| 20 20 20 20 24 66 6f 6f | 20 3d 20 40 66 6f 6f 3b | $foo| = @foo;|
|000062b0| 09 09 23 20 24 66 6f 6f | 20 67 65 74 73 20 33 0d |..# $foo| gets 3.|
|000062c0| 0d 2e 66 69 0d 59 6f 75 | 20 6d 61 79 20 68 61 76 |..fi.You| may hav|
|000062d0| 65 20 61 6e 20 6f 70 74 | 69 6f 6e 61 6c 20 63 6f |e an opt|ional co|
|000062e0| 6d 6d 61 20 62 65 66 6f | 72 65 20 74 68 65 20 63 |mma befo|re the c|
|000062f0| 6c 6f 73 69 6e 67 20 70 | 61 72 65 6e 74 68 65 73 |losing p|arenthes|
|00006300| 69 73 20 6f 66 20 61 6e | 0d 61 72 72 61 79 20 6c |is of an|.array l|
|00006310| 69 74 65 72 61 6c 2c 20 | 73 6f 20 74 68 61 74 20 |iteral, |so that |
|00006320| 79 6f 75 20 63 61 6e 20 | 73 61 79 3a 0d 2e 6e 66 |you can |say:..nf|
|00006330| 0d 0d 20 20 20 20 40 66 | 6f 6f 20 3d 20 28 0d 09 |.. @f|oo = (..|
|00006340| 31 2c 0d 09 32 2c 0d 09 | 33 2c 0d 20 20 20 20 29 |1,..2,..|3,. )|
|00006350| 3b 0d 0d 2e 66 69 0d 57 | 68 65 6e 20 61 20 4c 49 |;...fi.W|hen a LI|
|00006360| 53 54 20 69 73 20 65 76 | 61 6c 75 61 74 65 64 2c |ST is ev|aluated,|
|00006370| 20 65 61 63 68 20 65 6c | 65 6d 65 6e 74 20 6f 66 | each el|ement of|
|00006380| 20 74 68 65 20 6c 69 73 | 74 20 69 73 20 65 76 61 | the lis|t is eva|
|00006390| 6c 75 61 74 65 64 20 69 | 6e 0d 61 6e 20 61 72 72 |luated i|n.an arr|
|000063a0| 61 79 20 63 6f 6e 74 65 | 78 74 2c 20 61 6e 64 20 |ay conte|xt, and |
|000063b0| 74 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 61 72 |the resu|lting ar|
|000063c0| 72 61 79 20 76 61 6c 75 | 65 20 69 73 20 69 6e 74 |ray valu|e is int|
|000063d0| 65 72 70 6f 6c 61 74 65 | 64 20 69 6e 74 6f 20 4c |erpolate|d into L|
|000063e0| 49 53 54 0d 6a 75 73 74 | 20 61 73 20 69 66 20 65 |IST.just| as if e|
|000063f0| 61 63 68 20 69 6e 64 69 | 76 69 64 75 61 6c 20 65 |ach indi|vidual e|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.